/* ============================================
   ULTIMATE ENHANCEMENTS STYLES
   ============================================ */

/* --- New Horizontal Card & Grid --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    padding: 10px 0;
}

.horizontal-card {
    display: flex;
    height: 220px;
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Subtle border */
    border-radius: 20px;
    /* Modern rounded corners */
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    cursor: pointer;
}

.horizontal-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
    /* Accent color glow */
}

/* Poster Left Side */
.h-card-poster-wrapper {
    width: 150px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.h-card-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.horizontal-card:hover .h-card-poster {
    transform: scale(1.05);
}

.h-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.4), transparent);
}

/* Overlays on Poster */
.h-card-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fbbf24;
    /* Amber-400 */
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.h-card-flag {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 18px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Content Right Side */
.h-card-content {
    flex: 1;
    padding: 18px;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    /* Fix flex child overflow */
}

/* Header: Year & Tags */
.h-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.75rem;
}

.h-year-badge {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    color: #cbd5e1;
    font-weight: 500;
}

.h-genre-list {
    display: flex;
    gap: 6px;
    overflow: hidden;
}

.h-genre-badge {
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
}

/* Text */
.h-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(to right, #fff, #e2e8f0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.h-card-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Actions */
.h-card-actions {
    margin-top: auto;
}

.h-btn-play {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.3);
}

.h-btn-play:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.4);
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-card {
        height: auto;
    }

    .h-card-poster-wrapper {
        width: 120px;
    }

    .h-card-desc {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10002;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-color: #10b981;
}

.toast-error {
    border-color: #ef4444;
}

.toast-warning {
    border-color: #f59e0b;
}

.toast-info {
    border-color: var(--accent-color);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-message {
    flex: 1;
    color: var(--text-primary);
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loading */
.skeleton-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 10px;
}

.skeleton-text {
    height: 16px;
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Page Transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

/* Enhanced Hover Effects */
.media-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(94, 114, 228, 0.3);
}

.media-card:active {
    transform: translateY(-5px) scale(0.98);
}

/* Premium Button Modernization */
.btn {
    position: relative;
    overflow: hidden;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
    filter: brightness(1.1);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn:active {
    transform: scale(0.96);
}

/* Glassmorphism Containers */
.glass-panel {
    background: rgba(18, 18, 24, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(124, 58, 237, 0.3);
}

/* Modern Form Elements */
.form-input,
.search-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    color: white !important;
    padding: 12px 16px !important;
    transition: all 0.3s ease !important;
    outline: none !important;
}

.form-input:focus,
.search-input:focus {
    border-color: var(--accent-color) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1) !important;
}

/* Daily Quests */
.quest-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.quest-card:hover {
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.quest-card.completed {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
}

.quest-icon {
    font-size: 2rem;
}

.quest-info {
    flex: 1;
}

.quest-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.quest-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    transition: width 0.5s ease;
}

.quest-reward {
    font-weight: 600;
    color: var(--accent-color);
}

/* Leaderboard */
.leaderboard-item {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.leaderboard-item.top-3 {
    border-width: 3px;
    background: linear-gradient(135deg, rgba(94, 114, 228, 0.1), rgba(130, 94, 228, 0.1));
}

.rank {
    font-size: 1.5rem;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}

.lb-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
}

.lb-username {
    flex: 1;
    font-weight: 600;
}

.lb-level {
    background: var(--accent-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.lb-xp {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-box:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.animate-slide-in {
    animation: slideIn 0.3s ease;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .toast {
        min-width: 250px;
        bottom: 10px;
        right: 10px;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .leaderboard-item {
        padding: 10px;
        gap: 10px;
    }

    .lb-avatar {
        width: 40px;
        height: 40px;
    }
}

/* User Badges in Comments */
.user-badges .badge-vip,
.user-badges .badge-translator,
.user-badges .badge-admin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    cursor: help;
}

.badge-vip {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.badge-translator {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.badge-admin {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #fff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.user-badges span:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px currentColor;
}

/* --- HORIZONTAL CARD REDESIGN --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    gap: 25px;
    padding: 10px 0;
}

@media (min-width: 1200px) {
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    }
}

.horizontal-card {
    display: flex;
    height: 200px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.horizontal-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.h-card-poster-wrapper {
    flex: 0 0 140px;
    position: relative;
    overflow: hidden;
}

.h-card-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.horizontal-card:hover .h-card-poster {
    transform: scale(1.1);
}

.h-card-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.h-card-flag {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 16px;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.h-card-content {
    flex: 1;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.h-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.h-year-badge {
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
}

.h-genre-list {
    display: flex;
    gap: 8px;
    overflow: hidden;
}

.h-genre-badge {
    font-size: 0.75rem;
    color: #a78bfa;
    padding: 2px 8px;
    background: rgba(167, 139, 250, 0.1);
    border-radius: 6px;
    white-space: nowrap;
}

.h-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h-card-desc {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.h-card-actions {
    display: flex;
    gap: 10px;
}

.h-btn-play {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.h-btn-play:hover {
    background: #7c3aed;
}

.h-btn-detail {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
}

.h-btn-detail:hover {
    background: rgba(255, 255, 255, 0.15);
}


/* --- PREMIUM HORIZONTAL CARD DESIGN (FORCED & UPGRADED) --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    /* Widened from 320px */
    gap: 25px;
    padding: 20px 0;
}

.horizontal-card {
    display: flex;
    background: rgba(30, 30, 40, 0.6);
    /* Slightly darker for contrast */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    height: 200px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(12px);
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.horizontal-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(45, 45, 60, 0.8);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

.horizontal-card:hover .h-card-poster {
    transform: scale(1.1) rotate(2deg);
}

.h-card-poster-wrapper {
    width: 150px;
    /* Slightly wider poster area */
    min-width: 150px;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.h-card-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.h-card-overlay {
    position: absolute;
    inset: 0;
    /* Bottom-only gradient to keep top flag clear */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
    z-index: 1;
}

.h-card-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.85);
    /* Darker bg for visibility */
    color: #fbbf24;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 5;
    /* Ensure above overlay */
}


.h-card-flag {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 20px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.h-card-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
}

.h-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.h-year-badge {
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    color: #e2e8f0;
}

.h-genre-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.h-genre-badge {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.h-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: white;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.h-card-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
    line-height: 1.5;
}

.h-card-actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.h-btn-play {
    background: linear-gradient(135deg, #8b5cf6, #d946ef);
    border: none;
    color: white;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.h-btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.6);
    filter: brightness(1.1);
}

.h-btn-play i {
    font-size: 0.8rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .horizontal-card {
        height: auto;
        /* Allow auto height on mobile */
        min-height: 140px;
    }

    .h-card-poster-wrapper {
        width: 100px;
        min-width: 100px;
    }

    .h-card-title {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .h-card-desc {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        margin-bottom: 10px;
    }

    .h-card-content {
        padding: 12px;
    }

    .h-btn-play {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Hide some details on very small screens if needed */
    /* Hide some details on very small screens if needed */
    .h-genre-badge:nth-child(n+2) {
        display: none;
    }
}

/* --- Added Missing Browse Page Styles --- */
.h-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.h-year-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.h-genre-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.h-genre-badge {
    background: rgba(139, 92, 246, 0.2);
    color: #d8b4fe;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.h-card-title {
    font-size: 1.25rem;
    margin: 0 0 10px 0;
    color: white;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Increase visibility */
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.h-card-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 15px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    /* Fix for Firefox/Standard line-clamp */
    line-clamp: 3;
}

.h-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    z-index: 2;
    /* Content above overlay */
}