/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4F46E5;
    --secondary-color: #EC4899;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --bg-light: #F3F4F6;
    --white: #FFFFFF;
    --gradient-primary: linear-gradient(135deg, #4F46E5 0%, #EC4899 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* =========================================
   Hero Section
   ========================================= */
/* =========================================
   Hero Section
   ========================================= */
.hero-section {
    position: relative;
    min-height: auto;
    height: auto;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0.5rem 0;
    /* Add padding to prevent content touching edges */
    /* Reduced margin */
    color: var(--white);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) brightness(0.4);
    transform: scale(1.1);
    /* Prevent blur edges */
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 1rem 0;
    animation: fadeInUp 0.8s ease-out;
}

.main-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.artist-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.artist-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.artist-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.artist-name a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.artist-name a:hover {
    color: var(--secondary-color);
}

.upload-date {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-paragraph {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.scroll-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--gradient-primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.scroll-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.6);
}

/* =========================================
   Main Content Layout
   ========================================= */
.lyrics-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0.5rem 2rem;
    /* Reduced padding-bottom */
}

.hero-section {
    /* ... existing styles ... */
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
}

.content-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 50% Table, 50% Image */
    gap: 1rem;
    /* Reduced gap */
    margin-bottom: 2rem;
    /* Reduced margin */
    align-items: stretch;
    /* Equal height */
}

/* Image Side (Visually Left) */
.content-left {
    order: 1;
    /* Moved to Left */
    height: 100%;
}

.content-left .featured-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 100%;
    position: relative;
    background: #f9fafb;
}

.content-left .featured-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
}

.content-left .featured-image:hover img {
    transform: scale(1.03);
}

/* Table Side (Visually Right) */
.content-right {
    order: 2;
    /* Moved to Right */
    background: var(--white);
    padding: 1rem;
    /* Further reduced padding */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center vertically */
}

.info-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: center;
    /* Center title */
}

.title-border {
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    margin-bottom: 1rem;
    margin-left: auto;
    /* Center border */
    margin-right: auto;
}

/* Custom Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: auto;
    margin-bottom: auto;
}

table tr {
    border-bottom: 1px solid #E5E7EB;
    transition: background-color 0.2s;
}

/* Header Row Design */
table tr:first-child {
    background: var(--gradient-primary);
    color: var(--white);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

table tr:first-child td {
    color: var(--white);
    /* Override default colors */
    border: none;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

table tr:first-child td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

table tr:first-child td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

table tr:last-child {
    border-bottom: none;
}

table td {
    padding: 0.5rem 0.25rem;
    /* Further reduced padding */
    font-size: 0.95rem;
    text-align: center;
    /* Center content */
}

table td:first-child {
    font-weight: 600;
    color: var(--text-dark);
    width: 40%;
    /* Adjusted width for better centering balance */
}

/* Ensure first column in header row is also white */
table tr:first-child td:first-child {
    color: var(--white);
}

table td:last-child {
    color: var(--text-light);
}

/* Ensure last column in header row is also white */
table tr:first-child td:last-child {
    color: var(--white);
}

/* =========================================
   Lyrics & Recommendations Layout
   ========================================= */
.lyrics-recommendations-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    /* Reduced gap */
}

/* Lyrics Column */
.lyrics-content {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    text-align: center;
    /* Centered content */
}

.content-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.lyricist-info {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: inline-block;
    padding: 0.25rem 1rem;
    background: #F8FAFC;
    border-radius: 2rem;
    border: 1px solid #E2E8F0;
    box-shadow: var(--shadow-sm);
}

.lyricist-info span {
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 0.25rem;
}

pre {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    line-height: 2;
    color: #374151;
    white-space: pre-wrap;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    text-align: center;
    /* Maintain center alignment */
}

pre strong {
    color: var(--primary-color);
    font-weight: 700;
}

.end-marker {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #E5E7EB;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 1px;
}

/* Report Section */
.report-lyrics {
    background: #FEF2F2;
    border: 1px solid #FEE2E2;
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.report-lyrics h3 {
    color: #991B1B;
    margin-bottom: 0.5rem;
}

.report-lyrics p {
    color: #7F1D1D;
    margin-bottom: 1.5rem;
}

.report-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #EF4444;
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s;
}

.report-button:hover {
    background: #DC2626;
}

/* YouTube Section */
.youtube-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    /* Increased font size */
    margin-bottom: 1rem;
    text-align: center;
    /* Centered */
}

.youtube-video {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: #000;
}

.youtube-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =========================================
   Sidebar Recommendations
   ========================================= */
/* =========================================
   Sidebar Recommendations (Wizard Panel)
   ========================================= */
.sidebar-recommendations {
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
    padding: 20px;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.sidebar-recommendations h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    font-weight: 700;
    text-align: center;
}

.title-border-Recommendations {
    width: 50px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    margin: 0 auto 1.5rem;
    /* Reduced margin */
}

/* Individual Recommendation Card */
.sidebar-recommendation-item {
    display: flex;
    gap: 0.75rem;
    /* Reduced gap */
    padding: 0.75rem;
    /* Reduced padding */
    background: var(--white);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.5rem;
    /* Reduced margin */
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

/* Hover Effect for Cards */
.sidebar-recommendation-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

/* Subtle gradient overlay on hover */
.sidebar-recommendation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-recommendation-item:hover::before {
    opacity: 1;
}

.sidebar-rec-image {
    width: 60px;
    /* Smaller image */
    height: 60px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.sidebar-rec-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sidebar-recommendation-item:hover .sidebar-rec-image img {
    transform: scale(1.1);
}

.sidebar-rec-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.sidebar-rec-title {
    font-size: 0.95rem;
    /* Smaller Font */
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.sidebar-recommendation-item:hover .sidebar-rec-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Show More Button */
.show-more-btn {
    width: 100%;
    padding: 0.75rem;
    /* Reduced padding */
    margin-top: 1rem;
    /* Reduced margin */
    background: var(--white);
    border: 2px solid #e2e8f0;
    color: var(--text-dark);
    border-radius: var(--radius-lg);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.show-more-btn:hover {
    background: var(--text-dark);
    color: var(--white);
    border-color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.show-more-btn::after {
    content: '↓';
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.show-more-btn:hover::after {
    transform: translateY(3px);
}

/* =========================================
   "You Might Also Like" Grid
   ========================================= */
.you-might-like {
    max-width: 1280px;
    margin: 2rem auto 0;
    /* Reduced margin */
    padding: 0 1.5rem;
}

.you-might-like h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    /* Reduced margin */
    text-align: center;
}

.lyrics-grid-random {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    /* Reduced gap */
}

.lyric-card-random {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.lyric-card-random:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.image-container {
    position: relative;
    padding-top: 60%;
    /* Aspect ratio */
    overflow: hidden;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.lyric-card-random:hover .image-container img {
    transform: scale(1.1);
}

.category-label {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lyric-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
}

.lyric-meta div {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lyric-meta i {
    color: var(--primary-color);
}

/* =========================================
   FAQ Section
   ========================================= */
.lyrics-faq {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.youtube-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    /* Increased font size */
    margin-bottom: 0.5rem;
    text-align: center;
    /* Centered */
}

/* ... existing youtube-video styles ... */

/* =========================================
   FAQ Section
   ========================================= */
.lyrics-faq {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.qna-section h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    /* Space for underline */
}

/* Underline for FAQ Title */
.qna-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.qna-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qna-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.qna-question {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.qna-question i {
    color: var(--primary-color);
    margin-top: 0.2rem;
}

.qna-answer {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-left: 0.25rem;
}

.qna-answer i {
    color: var(--secondary-color);
    margin-top: 0.3rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.qna-answer-continuation {
    margin-left: 2.25rem;
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 1024px) {
    .content-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .content-left {
        order: unset;
        /* Reset order on mobile */
        height: auto;
    }

    .content-right {
        order: unset;
        height: auto;
    }

    .content-left .featured-image {
        position: static;
        max-width: 500px;
        margin: 0 auto;
        height: auto;
    }

    .lyrics-recommendations-container {
        grid-template-columns: 1fr;
    }

    .sidebar-recommendations {
        position: static;
    }
}

@media (max-width: 768px) {
    .hero-section {
        height: auto;
        padding: 6rem 1rem 3rem;
        /* Account for fixed header */
        min-height: auto;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .lyrics-content {
        padding: 1.5rem;
    }

    .content-title {
        font-size: 1.75rem;
    }

    pre {
        font-size: 1rem;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Lyrics Translation Toggle
   ========================================= */
.lyrics-toggle-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.lyrics-toggle-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-family: 'Inter', sans-serif;
}

/* Show Translation - Active (Purple Gradient) */
.lyrics-toggle-btn.active {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

/* Hide Translation - Inactive (White with Border) */
.lyrics-toggle-btn:not(.active) {
    background: var(--white);
    color: var(--text-dark);
    border-color: #E2E8F0;
}

.lyrics-toggle-btn:hover {
    transform: translateY(-2px);
}

.lyrics-content-block {
    font-size: 1rem;
    line-height: 1.5;
}

/* Translation Lines Styling */
/* Translation Lines Styling */
.lyric-line {
    margin-bottom: 0.2rem;
    min-height: 1rem;
    /* Maintain line height */
}

.translation-line {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: opacity 0.3s ease, height 0.3s ease;
}

/* Hidden State */
.translation-line.hidden {
    display: none;
}