* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', cursive, sans-serif;
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f5 50%, #f5f0ff 100%);
    min-height: 100vh;
    color: #5c4033;
}

header {
    text-align: center;
    padding: 40px 20px;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

h1 {
    font-size: 36px;
    color: #ff6b9d;
    text-shadow: 2px 2px 0px rgba(255, 107, 157, 0.2);
}

.subtitle {
    font-size: 16px;
    color: #999;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 8px;
}

.category-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 24px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #ff6b9d;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.15);
}

.tab:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.25);
}

.tab.active {
    background: linear-gradient(135deg, #ff6b9d, #ff85b3);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    padding: 0 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.emoji-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    text-align: center;
    font-size: 26px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    user-select: none;
    white-space: nowrap;
}

.emoji-item:hover {
    transform: scale(1.1) rotate(3deg);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.25);
    background: linear-gradient(135deg, #fff5f5, #fff0f5);
}

.emoji-item:active {
    transform: scale(0.95);
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    font-size: 20px;
    color: #999;
}

footer {
    text-align: center;
    padding: 30px;
    color: #aaa;
    font-size: 14px;
}

footer p {
    background: rgba(255, 255, 255, 0.6);
    padding: 10px 20px;
    border-radius: 20px;
    display: inline-block;
}

footer a {
    color: #ff6b9d;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #ff5a8a;
    text-decoration: underline;
}

.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #ff6b9d, #ff85b3);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 2px solid #f0f0f0;
    border-radius: 50%;
    background: white;
    color: #ff6b9d;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    border-color: #ff6b9d;
    background: rgba(255, 107, 157, 0.1);
}

.page-btn.active {
    background: linear-gradient(135deg, #ff6b9d, #ff85b3);
    color: white;
    border-color: #ff6b9d;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-dots {
    color: #999;
    padding: 0 5px;
}

@media (max-width: 768px) {
    h1 {
        font-size: 28px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
    }
    
    .emoji-item {
        font-size: 26px;
        padding: 20px 12px;
    }
}