:root {
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.5);
    --secondary: #06b6d4;
    --secondary-glow: rgba(6, 182, 212, 0.5);
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--primary);
    /* Fallback */
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-main);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary);
}

.cta-button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--primary-glow);
    color: white;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('../images/general/hero.png') no-repeat center center/cover;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.6), var(--bg-dark));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.search-bar {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    /* For suggestions dropdown */
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem;
    color: white;
    font-size: 1rem;
    outline: none;
}

.search-bar input:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
    border-radius: 50px;
}

.search-bar button {
    background: var(--primary);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Search Suggestions */
.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #f0f0f0;
}

/* Cards & Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Trending List */
.trending-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.trending-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.trending-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Footer */
footer {
    background: #020617;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: white;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--secondary);
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        /* Height of header */
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        display: flex;
    }

    .hero {
        padding: 0 1rem;
    }

    .search-bar input {
        font-size: 16px !important;
        /* Prevent zoom on iOS */
        padding: 1rem !important;
    }
}

/* ===== UTILITY CLASSES ===== */
.pt-24 {
    padding-top: 6rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.my-16 {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mt-12 {
    margin-top: 3rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.text-main {
    color: var(--text-main);
}

.text-secondary {
    color: var(--secondary);
}

.font-bold {
    font-weight: 600;
}

.block {
    display: block;
}

.relative {
    position: relative;
}

.w-full {
    width: 100%;
}

.flex-align-start {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

/* ===== TRUST SIGNALS SECTION ===== */
.trust-signals {
    background: rgba(6, 182, 212, 0.1);
    padding: 3rem 0;
    margin: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    color: var(--secondary);
    font-size: 2.5rem;
    margin: 0;
}

/* ===== SEARCH SUGGESTIONS ===== */
.search-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-header {
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    font-weight: 600;
    font-size: 0.8rem;
    color: #666;
    border-bottom: 1px solid #eee;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f0f0f0;
}

/* ===== LYRICS PREVIEW ===== */
.lyric-preview {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 2rem;
    border-left: 4px solid var(--secondary);
    margin: 4rem auto;
}

.lyric-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.lyric-pre-block {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    color: var(--text-main);
    white-space: pre-wrap;
    font-family: inherit;
    margin: 0;
    line-height: 1.6;
}

/* ===== SECTION HEADER ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* ===== GRID FIX ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* ===== CARD ENHANCEMENT ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

/* Card Link Fix */
.card>a {
    color: var(--text-main);
    text-decoration: none;
}

.card>a:hover {
    color: var(--primary);
}

a.card {
    display: block;
    color: inherit;
}

a.card:hover h3 {
    color: var(--primary);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* Image Container Fix */
.card-image-container {
    position: relative;
    width: 100%;
    padding-top: 75%;
    /* 4:3 Aspect Ratio */
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.card-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--text-main);
}

.card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* ===== TRENDING SECTION ===== */
.trending-rank {
    background: var(--secondary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Corrected Trending List */
.trending-list {
    display: grid;
    gap: 1rem;
}

.trending-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: background 0.2s ease;
    margin-bottom: 0.5rem;
}

.trending-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ===== BLOG SECTION ===== */
.blog-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    padding: 4rem 2rem;
}

.tag-category {
    color: var(--secondary);
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* ===== USER INFO ===== */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== SKIP TO CONTENT (Accessibility) ===== */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--secondary);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 1001;
    transition: top 0.3s;
    border-radius: 0 0 8px 0;
}

.skip-to-content:focus {
    top: 0;
    z-index: 9999;
}

/* ===== FOOTER ===== */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--secondary);
}

.footer-legal {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

.footer-legal ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-legal ul li a {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration: none;
}

.footer-legal ul li a:hover {
    color: var(--secondary);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* ===== LOADING STATES ===== */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: -10px;
    margin-top: -10px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply fade-in animation to cards */
.card {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Delay animations for staggered effect */
.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.2s;
}

/* ===== FOCUS STATES ===== */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
    border-radius: 4px;
}

.nav-links a:focus {
    color: var(--primary);
    outline: none;
    text-decoration: underline;
}

.cta-button:focus {
    outline-offset: 4px;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.3);
}

.search-bar input:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 0;
    border-radius: 50px 0 0 50px;
}

/* ===== Z-INDEX FIX ===== */
header {
    z-index: 1000;
}

.mobile-menu-btn {
    z-index: 1002;
}

.hero-content {
    z-index: 1;
    position: relative;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

    /* Fix hero height on mobile */
    .hero {
        height: auto;
        min-height: calc(100vh - 80px);
        /* Subtract header height */
        padding: 2rem 1rem;
        display: flex;
        align-items: center;
    }

    .hero-content {
        width: 100%;
    }

    /* Adjust section padding */
    section {
        padding: 3rem 0;
    }

    /* Fix search bar on mobile */
    .search-bar {
        flex-direction: column;
        background: transparent;
        border: none;
        padding: 0;
    }

    .search-bar input {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid var(--glass-border);
        border-radius: 50px;
        margin-bottom: 0.5rem;
    }

    .search-bar button {
        width: 100%;
        border-radius: 50px;
        height: 50px;
    }

    /* Adjust font sizes */
    h1 {
        font-size: 2.2rem;
        line-height: 1.1;
    }

    .hero p {
        font-size: 1.1rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    .lyric-preview-header {
        flex-direction: column;
        gap: 1rem;
    }

    .lyric-preview-header .cta-button {
        align-self: flex-start;
    }

    .section-header {
        text-align: center;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .trending-item {
        padding: 0.75rem;
    }

    /* Stats grid on mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-legal ul {
        flex-direction: column;
        gap: 0.75rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {

    header,
    footer,
    .search-bar,
    .mobile-menu-btn,
    .trust-signals,
    .lyric-preview {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }

    a {
        color: black !important;
        text-decoration: underline;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    section {
        padding: 1rem 0 !important;
        page-break-inside: avoid;
    }

    h1 {
        color: black !important;
        background: none !important;
        -webkit-background-clip: unset !important;
        background-clip: unset !important;
    }
}

/* ===== TESTIMONIALS ===== */
.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-family: inherit;
    transition: border-color 0.3s, background 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}