/* Meme Creator Styles */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 100px;
    right: 20px;
    display: flex;
    gap: 0.5rem;
    z-index: 50;
    background: var(--bg-secondary);
    padding: 0.8rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.lang-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--accent);
    background: transparent;
    color: var(--accent);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.lang-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: var(--shadow-md);
}

/* Page Title */
.page-title {
    font-size: 2.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.page-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Category Filter */
.category-filter {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 3rem;
}

.category-filter h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--accent);
    background: transparent;
    color: var(--accent);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

.category-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: var(--shadow-md);
}

/* Meme Container */
.meme-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.input-panel, .preview-panel {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.input-panel h2, .preview-panel h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="color"],
.form-group input[type="range"],
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-primary);
    border: none;
    border-radius: 12px;
    outline: none;
    font-family: inherit;
    color: var(--text-primary);
    box-shadow: var(--shadow-inset);
    transition: all 0.3s ease;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="color"]:focus,
.form-group select:focus {
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 3px var(--accent);
}

.form-group input[type="range"] {
    padding: 0;
    height: 8px;
    cursor: pointer;
}

.form-group small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

/* Emoji Picker */
.emoji-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 0.5rem;
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-inset);
}

.emoji-btn {
    background: transparent;
    border: 2px solid transparent;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.emoji-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    transform: scale(1.2);
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.button-group .btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.9rem;
}

/* Meme Preview */
.meme-preview {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

.meme-placeholder {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

.meme-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.meme-placeholder p {
    font-size: 1.1rem;
}

/* Canvas for Meme */
#memeCanvas {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.action-buttons .btn {
    flex: 1;
    padding: 12px 15px;
    font-size: 0.85rem;
}

/* AI Suggestions */
.ai-suggestions {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

.ai-suggestions h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 0.8rem;
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.suggestion-item p {
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
    font-size: 0.9rem;
    word-break: break-word;
}

/* Quick Suggestions */
.quick-suggestions {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 4rem;
}

.quick-suggestions h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.suggestion-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.suggestion-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.suggestion-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.use-btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.use-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Gallery Section */
.gallery-section {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 4rem;
}

.gallery-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-controls {
    margin-bottom: 1.5rem;
}

.gallery-controls .btn {
    width: 100%;
}

.meme-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.gallery-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay button {
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.gallery-item-overlay button:hover {
    background: var(--accent-light);
    transform: scale(1.1);
}

/* Tips Section */
.tips-section {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.tips-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.tip-card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.tip-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.tip-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Tablet Responsive Design (768px to 1024px) */
@media (max-width: 1024px) {
    .language-switcher {
        top: 80px;
        right: 15px;
        padding: 0.6rem;
    }

    .lang-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .page-title {
        font-size: 2.2rem;
    }

    .input-panel, .preview-panel {
        padding: 1.8rem;
    }

    .category-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    .button-group {
        gap: 0.8rem;
    }

    .button-group .btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .action-buttons .btn {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .meme-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Mobile Responsive Design (768px and below) */
@media (max-width: 768px) {
    .language-switcher {
        position: static;
        margin: 1rem 0;
        justify-content: center;
        margin-bottom: 1.5rem;
        width: 100%;
        border-radius: 12px;
        padding: 0.6rem;
    }

    .lang-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        flex: 1;
        justify-content: center;
    }

    .lang-btn span {
        display: none;
    }

    .lang-btn i {
        margin: 0;
    }

    .page-title {
        font-size: 1.8rem;
        margin-bottom: 0.3rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .category-filter {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .category-filter h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .category-buttons {
        gap: 0.6rem;
    }

    .category-btn {
        padding: 0.6rem 0.9rem;
        font-size: 0.75rem;
        border-radius: 20px;
    }

    .category-btn i {
        display: none;
    }

    .meme-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .input-panel, .preview-panel {
        padding: 1.5rem;
        border-radius: 15px;
    }

    .input-panel h2, .preview-panel h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .form-group input[type="text"],
    .form-group select {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .form-group small {
        font-size: 0.8rem;
    }

    .emoji-picker {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        padding: 0.8rem;
        gap: 0.4rem;
    }

    .emoji-btn {
        font-size: 1.3rem;
        padding: 0.4rem;
    }

    .button-group {
        flex-direction: column;
        gap: 0.8rem;
        margin-top: 1.5rem;
    }

    .button-group .btn {
        width: 100%;
        padding: 12px;
        font-size: 0.9rem;
    }

    .meme-preview {
        min-height: 300px;
    }

    .meme-placeholder {
        padding: 1.5rem;
    }

    .meme-placeholder i {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }

    .meme-placeholder p {
        font-size: 0.95rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.8rem;
        margin-bottom: 1rem;
    }

    .action-buttons .btn {
        width: 100%;
        padding: 12px;
        font-size: 0.9rem;
    }

    .ai-suggestions {
        padding: 1.2rem;
    }

    .ai-suggestions h3 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .suggestions-list {
        max-height: 250px;
    }

    .suggestion-item {
        padding: 0.6rem;
    }

    .suggestion-item p {
        font-size: 0.85rem;
    }

    .quick-suggestions {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .quick-suggestions h2 {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .suggestions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .suggestion-card {
        padding: 1.2rem;
    }

    .suggestion-text {
        font-size: 0.95rem;
        margin-bottom: 0.8rem;
    }

    .use-btn {
        padding: 0.7rem;
        font-size: 0.85rem;
    }

    .gallery-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .gallery-section h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .gallery-controls .btn {
        padding: 10px;
        font-size: 0.85rem;
    }

    .meme-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }

    .gallery-item img {
        height: 150px;
    }

    .gallery-item-overlay {
        gap: 0.5rem;
    }

    .gallery-item-overlay button {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .tips-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .tips-section h2 {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .tips-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tip-card {
        padding: 1.2rem;
    }

    .tip-card i {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .tip-card h4 {
        font-size: 1rem;
        margin-bottom: 0.6rem;
    }

    .tip-card p {
        font-size: 0.9rem;
    }
}

/* Extra Small Mobile (480px and below) */
@media (max-width: 480px) {
    .language-switcher {
        margin: 0.8rem 0;
        padding: 0.5rem;
        gap: 0.3rem;
    }

    .lang-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .page-title {
        font-size: 1.5rem;
        margin-bottom: 0.2rem;
    }

    .page-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .category-filter {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .category-filter h3 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .category-buttons {
        gap: 0.5rem;
    }

    .category-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.7rem;
    }

    .input-panel, .preview-panel {
        padding: 1.2rem;
    }

    .input-panel h2, .preview-panel h2 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .form-group {
        margin-bottom: 0.8rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input[type="text"],
    .form-group select {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .emoji-picker {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
        padding: 0.6rem;
        gap: 0.3rem;
    }

    .emoji-btn {
        font-size: 1.2rem;
        padding: 0.3rem;
    }

    .button-group .btn {
        padding: 10px;
        font-size: 0.85rem;
    }

    .meme-preview {
        min-height: 250px;
    }

    .meme-placeholder i {
        font-size: 2rem;
    }

    .action-buttons .btn {
        padding: 10px;
        font-size: 0.8rem;
    }

    .ai-suggestions {
        padding: 1rem;
    }

    .ai-suggestions h3 {
        font-size: 0.95rem;
    }

    .suggestions-list {
        max-height: 200px;
    }

    .quick-suggestions {
        padding: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .quick-suggestions h2 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .suggestion-card {
        padding: 1rem;
    }

    .suggestion-text {
        font-size: 0.9rem;
    }

    .meme-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .gallery-item img {
        height: 120px;
    }

    .tips-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .tip-card {
        padding: 1rem;
    }

    .tip-card i {
        font-size: 1.5rem;
    }

    .tip-card h4 {
        font-size: 0.95rem;
    }

    .tip-card p {
        font-size: 0.85rem;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    animation: slideIn 0.3s ease-out;
}

/* Utility Classes */
.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.success-message {
    background: var(--success-color);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease-out;
}

.error-message {
    background: var(--danger-color);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease-out;
}


/* Trending Meme Section Styles */
.trending-section {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 4rem;
}

.trending-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.trending-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trending-controls {
    display: flex;
    gap: 1rem;
}

.refresh-btn, .auto-play-btn {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.refresh-btn:hover, .auto-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.auto-play-btn.active {
    background: linear-gradient(135deg, #f56565, #fc8181);
}

/* Trending Memes Grid */
.trending-memes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-spinner i {
    font-size: 3rem;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Trending Meme Card */
.trending-meme-card {
    background: var(--bg-primary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.trending-meme-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.trending-card-header {
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trend-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.trend-score {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.trending-card-image {
    padding: 1rem;
    background: white;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trending-card-image canvas {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.trending-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.trending-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-card-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: auto;
}

.btn-small {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-weight: 600;
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Trending Stats */
.trending-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 10px;
    border-left: 4px solid var(--accent);
}

.stat-item i {
    font-size: 1.5rem;
    color: var(--accent);
}

.stat-item span {
    color: var(--text-primary);
    font-weight: 600;
}

.stat-item span:last-child {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Responsive Design for Trending Section */
@media (max-width: 1024px) {
    .trending-memes-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }

    .trending-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .trending-controls {
        width: 100%;
    }

    .refresh-btn, .auto-play-btn {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .trending-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .trending-header h2 {
        font-size: 1.3rem;
    }

    .trending-memes-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .trending-card-header {
        padding: 0.8rem;
    }

    .trend-title {
        font-size: 0.85rem;
    }

    .trending-card-image {
        min-height: 200px;
        padding: 0.8rem;
    }

    .trending-card-content {
        padding: 1rem;
    }

    .trending-text {
        font-size: 0.85rem;
        margin-bottom: 0.6rem;
    }

    .trending-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .stat-item {
        padding: 0.8rem;
    }
}

@media (max-width: 480px) {
    .trending-section {
        padding: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .trending-header h2 {
        font-size: 1.1rem;
    }

    .trending-memes-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .trending-controls {
        flex-direction: column;
        gap: 0.6rem;
    }

    .refresh-btn, .auto-play-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .trending-card-header {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .trending-card-image {
        min-height: 150px;
        padding: 0.6rem;
    }

    .trending-card-content {
        padding: 0.8rem;
    }

    .trending-text {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .btn-small {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }
}
