/* Same great styles, reshaped for horizontal nav! */

:root {
    --bg-app: #f5f5f7;
    --border-color: #e6e6e8;

    --text-primary: #1c1c1e;
    --text-secondary: #6e6e73;

    --accent-blue: #0EA5E9;
    /* Tech Blue */
    --accent-light: #38BDF8;
    /* Lighter Blue */
    --accent-dark: #0284C7;
    /* Darker Blue */

    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05);



    --font-stack: "Plus Jakarta Sans", system-ui, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-stack);
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    display: flex;
    flex-direction: column;
    /* height: 100%; Removed fixed height */
    width: 100%;
}

/* AMAZON AD BANNER */
.amazon-ad-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 9px 24px;
    background: #fff8f0;
    border-bottom: 1px solid #fde8c8;
}

.amazon-ad-img {
    height: 18px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.amazon-ad-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
    text-decoration: none;
    transition: color 0.15s;
}

.amazon-ad-link:hover {
    color: #b45309;
    text-decoration: underline;
}

.amazon-ad-divider {
    color: #d97706;
    font-size: 14px;
    user-select: none;
}

/* TOP NAV */
.top-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    width: 100%;
    max-width: 100vw;
    /* Garantera att den inte blir bredare än skärmen */
}

.nav-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    /* Centrera innehållet */
    margin: 0 auto;
}

.logo-mark {
    display: flex;
    align-items: center;
    gap: 12px;
}



/* CHORD STRIP (Multi-line / Wrapping) */
.chord-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 8px 4px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-category {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
    padding: 0 6px;
}

.chord-cat-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-dark);
    text-transform: uppercase;
    margin-right: 6px;
}

.meta-icon {
    width: 14px;
    height: 14px;
    color: var(--accent-blue);
}

.chord-btn {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.chord-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-1px);
}

.chord-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.main-view {
    position: relative;
    width: 100%;
    /* Fixar centreringen */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* justify-content: center; Remove to allow scrolling */
    padding: 20px 20px 120px 20px;
    /* Samma padding top/sidor (20px) */
    background: transparent;
    /* Låt sidans bakgrundsfärg synas */
}

/* (Grid pattern removed) */

/* HERO STATE */
.hero-state {
    text-align: center;
    max-width: 500px;
    margin-top: 40px;
    position: relative;
    /* Fixar så z-index fungerar */
    z-index: 10;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #1c1c1e 0%, #48484a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-val {
    font-size: 20px;
    font-weight: 700;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 4px;
}

.separator {
    width: 1px;
    height: 32px;
    background: #e5e5ea;
}

/* CHORD CARD */
.chord-card-container {
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 10;
    margin-top: 20px;
    /* Slight top margin */
}

.gradient-orb {
    display: none;
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.1);
}

.card-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.meta-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.6);
    padding: 6px 12px;
    border-radius: 50px;
}

.difficulty-level {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.dots {
    display: flex;
    gap: 4px;
}

.dot {
    width: 6px;
    height: 6px;
    background: #e5e5ea;
    border-radius: 50%;
}

.dot.filled {
    background: #34c759;
}

.card-body {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 24px;
    align-items: start;
}

.chord-info {
    display: flex;
    flex-direction: column;
}

.label-tiny {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.display-title {
    font-size: 100px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 8px;
    color: #1c1c1e;
}

.chord-full-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}

.chord-aliases {
    font-size: 13px;
    font-weight: 500;
    color: #aeaeb2;
    margin-bottom: 24px;
    font-style: italic;
}

/* VARIATION CONTROLS */
.variation-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 24px;
}

.variation-btn {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.variation-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.variation-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

.quick-facts {
    display: flex;
    gap: 32px;
}

.fact-val {
    font-size: 16px;
    font-weight: 600;
    margin-top: 2px;
}

.canvas-area {
    display: flex;
    justify-content: center;
}

/* Canvas centered in its column */
canvas {
    width: 100%;
    max-width: 260px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.05));
}

.card-footer {
    grid-column: 1 / -1;
    margin-top: 16px;
    display: flex;
}

.tip-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 10px 16px;
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-secondary);
    box-shadow: var(--shadow-soft);
}

.tip-box svg {
    color: var(--accent-blue);
}

/* Color the icon inside tip box */

.hidden {
    display: none !important;
}

/* CHORD DETAILS — SEO content section below the chord card */
.chord-details {
    width: 100%;
    max-width: 800px;
    margin: 32px auto 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.chord-details .detail-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 8px 30px -8px rgba(0, 0, 0, 0.06);
}

.chord-details .detail-card h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chord-details .detail-card h2 .detail-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-blue);
}

.chord-details .detail-card p,
.chord-details .detail-card li {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.chord-details .detail-card ol {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chord-details .detail-card ol li::marker {
    color: var(--accent-blue);
    font-weight: 700;
}

.chord-details .quick-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.chord-details .quick-info-item {
    background: rgba(14, 165, 233, 0.05);
    border: 1px solid rgba(14, 165, 233, 0.12);
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
}

.chord-details .quick-info-item .qi-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-dark);
    margin-bottom: 4px;
}

.chord-details .quick-info-item .qi-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.chord-details .quick-info-item .qi-value a {
    display: inline-block;
    padding: 3px 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-blue);
    text-decoration: none;
    transition: all 0.15s;
    margin: 2px;
}

.chord-details .quick-info-item .qi-value a:hover {
    border-color: var(--accent-blue);
    background: rgba(14, 165, 233, 0.06);
    transform: translateY(-1px);
}

.chord-details .related-chords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.chord-details .related-chords-list a {
    display: inline-block;
    padding: 6px 14px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
    transition: all 0.15s;
}

.chord-details .related-chords-list a:hover {
    border-color: var(--accent-blue);
    background: rgba(14, 165, 233, 0.06);
    transform: translateY(-1px);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-top-row {
        flex-wrap: wrap;
        gap: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f2f2f7;
    }

    .logo-mark {
        flex: 1;
    }

    .search-wrapper {
        order: 3;
        width: 100%;
        max-width: none;
    }

    .nav-extras {
        display: none;
    }

    /* Hide version on mobile */
    .top-nav {
        padding: 12px 16px;
        gap: 12px;
    }

    .card-body {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .chord-info {
        align-items: center;
    }

    .variation-controls {
        justify-content: center;
        margin-bottom: 32px;
    }

    .quick-facts {
        justify-content: center;
    }

    .card-footer {
        justify-content: center;
    }

    .glass-card {
        padding: 24px;
        gap: 24px;
    }

    .display-title {
        font-size: 72px;
    }
}