/* Emoji Generator Fixed Styles - No Black Header, Black Text, 5 Emoji Display */
* {
    box-sizing: border-box;
}

.emoji-generator-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.emoji-generator-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #ffffff; /* White background instead of black */
    color: #000000; /* Black text */
    border-radius: 8px;
    border: 2px solid #f0f0f0; /* Light border for definition */
}

.emoji-generator-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.2em;
    font-weight: 700;
    color: #000000; /* Ensure black text */
}

.emoji-generator-header p {
    margin: 0;
    font-size: 1.1em;
    color: #333333; /* Dark gray for subtitle */
}

.emoji-search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    align-items: center;
}

.emoji-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    color: #000000; /* Black text in input */
    transition: border-color 0.3s ease;
}

.emoji-search-input:focus {
    outline: none;
    border-color: #FE2C55;
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.1);
}

.emoji-search-input::placeholder {
    color: #666666; /* Gray placeholder text */
}

.clear-search-btn {
    padding: 12px 20px;
    background-color: #FE2C55;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background-color: #e02449;
    transform: translateY(-1px);
}

.emoji-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    justify-content: center;
}

.category-btn {
    padding: 10px 16px;
    background-color: #f5f5f5;
    color: #000000; /* Black text for category buttons */
    border: 2px solid transparent;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-btn:hover {
    background-color: #FE2C55;
    color: white;
    transform: translateY(-2px);
}

.category-btn.active {
    background-color: #FE2C55;
    color: white;
    border-color: #FE2C55;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Exactly 5 columns for 5 emojis */
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    background-color: #fafafa;
    min-height: 120px; /* Height for exactly one row of 5 emojis */
    max-height: 120px; /* Prevent expansion */
    justify-items: center;
    align-items: center;
}

.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    font-size: 32px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    background-color: white;
    border: 2px solid transparent;
}

.emoji-item:hover {
    background-color: #FE2C55;
    transform: scale(1.1);
    border-color: #FE2C55;
    box-shadow: 0 4px 12px rgba(254, 44, 85, 0.3);
}

.load-more-btn {
    display: block;
    width: 100%;
    padding: 15px 20px;
    margin: 20px 0;
    background-color: #FE2C55;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.load-more-btn:hover {
    background-color: #e02449;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 44, 85, 0.3);
}

.load-more-btn:active {
    transform: translateY(0);
}

.copy-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #FE2C55; /* Use theme color instead of black */
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(254, 44, 85, 0.3);
}

.copy-notification.show {
    opacity: 1;
    visibility: visible;
}

.copy-notification #copied-emoji {
    font-size: 20px;
    margin-right: 8px;
}

.emoji-generator-footer {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #000000; /* Black text in footer */
    font-size: 14px;
}

.emoji-generator-footer span {
    font-weight: 600;
    color: #FE2C55;
}

/* Navigation buttons for 5-emoji display */
.emoji-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    gap: 10px;
}

.nav-btn {
    padding: 10px 20px;
    background-color: #FE2C55;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.nav-btn:hover {
    background-color: #e02449;
    transform: translateY(-1px);
}

.nav-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.emoji-counter {
    font-size: 14px;
    color: #000000; /* Black text */
    font-weight: 500;
    text-align: center;
    flex: 1;
}

.emoji-counter .current-range {
    font-weight: 600;
    color: #FE2C55;
}

/* Loading state */
.emoji-grid.loading {
    opacity: 0.7;
    pointer-events: none;
}

.emoji-grid.loading::after {
    content: "Loading...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(254, 44, 85, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .emoji-generator-container {
        padding: 15px;
        margin: 10px;
    }
    
    .emoji-generator-header h2 {
        font-size: 1.8em;
    }
    
    .emoji-categories {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .category-btn {
        flex-shrink: 0;
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(5, 1fr); /* Keep 5 columns on mobile */
        gap: 8px;
        padding: 15px;
        min-height: 100px;
        max-height: 100px;
    }
    
    .emoji-item {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .emoji-search-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .clear-search-btn {
        width: 100%;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 12px;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .emoji-generator-header h2 {
        font-size: 1.5em;
    }
    
    .emoji-generator-header p {
        font-size: 1em;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(5, 1fr); /* Always 5 columns */
        gap: 6px;
        padding: 12px;
        min-height: 80px;
        max-height: 80px;
    }
    
    .emoji-item {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Animation for emoji changes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.emoji-item.new {
    animation: fadeIn 0.3s ease-out;
}

