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

html, body {
    min-height: 100%;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #222;
}

body {
    background: url('images/pozadi.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    padding: 12px 0 24px;
}

/* =========================================================
   SPOLEČNÝ VZHLED "PLAVOUCÍCH BUBLIN"
   ========================================================= */

header.topbar,
aside.sidebar,
section.content {
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 8px;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.28),
        0 1px 2px rgba(0, 0, 0, 0.18);
}

/* ---------- HORNÍ LIŠTA ---------- */
header.topbar {
    width: calc(100% - 32px);
    max-width: 1200px;
    height: 46px;
    margin: 0 auto 14px;
    padding: 0 18px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(
        180deg,
        rgba(73, 160, 218, 0.92),
        rgba(34, 112, 174, 0.92)
    );
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    border-color: rgba(0, 92, 160, 0.75);
}

header.topbar .logo {
    display: none;
}

nav.top-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

nav.top-nav a {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    padding: 7px 18px;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: .2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

nav.top-nav a:hover,
nav.top-nav a.active {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

/* ---------- HLAVNÍ OBLAST ---------- */
main.layout {
    width: calc(100% - 32px);
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* ---------- LEVÝ BOX – SEZNAM PÍSNÍ ---------- */
aside.sidebar {
    width: 250px;
    flex-shrink: 0;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    overflow-x: hidden;

    padding: 0;
    background: rgba(220, 230, 240, 0.86);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    color: #222;
}

aside.sidebar h3 {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 20px 9px;
    font-size: .88em;
    font-weight: 600;
    text-align: center;
    color: #333;
    background: linear-gradient(
        180deg,
        rgba(247, 249, 251, .96),
        rgba(215, 224, 233, .94)
    );
    border-bottom: 1px solid rgba(80, 80, 80, .22);
}

aside.sidebar ul {
    list-style: none;
}

aside.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #222;
    text-decoration: none;
    padding: 7px 16px;
    border-left: 3px solid transparent;
    border-bottom: 1px solid rgba(80, 80, 80, .20);
    font-size: .90em;
    font-weight: 500;
    transition: background .2s ease, border-color .2s ease, padding-left .2s ease;
}

aside.sidebar a:hover {
    background: rgba(255, 255, 255, .55);
    padding-left: 18px;
}

aside.sidebar a.active {
    background: rgba(255, 255, 255, .74);
    border-left-color: #1769aa;
    color: #111;
}

.note-icon {
    width: 18px;
    flex: 0 0 18px;
    font-size: 1.2em;
    line-height: 1;
}

/* ---------- VYHLEDÁVÁNÍ V LEVÉM PANELU ---------- */
.song-search {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 8px 10px;
    background: rgba(220, 230, 240, 0.96);
    border-bottom: 1px solid rgba(80, 80, 80, .20);
}

.song-search-wrap {
    position: relative;
}

.song-search-icon {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: #66727d;
    font-size: .95em;
    pointer-events: none;
}

#song-search {
    width: 100%;
    height: 32px;
    padding: 5px 9px 5px 30px;
    border: 1px solid rgba(70, 90, 110, .28);
    border-radius: 16px;
    background: rgba(255,255,255,.72);
    color: #222;
    outline: none;
    font: inherit;
    font-size: .88em;
}

#song-search:focus {
    border-color: rgba(23, 105, 170, .55);
    background: rgba(255,255,255,.9);
    box-shadow: 0 0 0 2px rgba(23,105,170,.10);
}

.song-search-empty {
    display: none;
    padding: 10px 12px;
    color: #68737d;
    font-size: .88em;
}

.empty-item {
    padding: 12px 20px;
    color: #666;
}

/* ---------- PRAVÝ OBSAH – DRUHÁ BUBLINA ---------- */
section.content {
    flex: 1;
    min-width: 0;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    padding: 20px;

    background: rgba(220, 235, 245, 0.80);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #222;
}

section.content h2 {
    margin-bottom: 15px;
    font-size: 1.6em;
}

section.content p {
    line-height: 1.6;
    margin-bottom: 12px;
    color: #3d4650;
}

/* ---------- HLAVIČKA PÍSNĚ ---------- */
.song-header {
    margin: 2px 2px 18px;
}

.song-header h1 {
    color: #222;
    font-size: 1.65em;
    font-weight: 400;
    margin: 0;
}

.song-divider {
    height: 1px;
    background: rgba(40, 40, 40, .55);
    margin: 8px 0 12px;
}

.voice-selector {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.voice-title {
    color: #333;
    margin-right: 5px;
}

.voice-button {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid #aeb7c0;
    color: #222;
    text-decoration: none;
    font-weight: 600;
    transition: background .2s, box-shadow .2s, transform .15s;
}

.voice-button:hover {
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
    transform: translateY(-1px);
}

.voice-button.active {
    background: #397fbb;
    border-color: #286ca5;
    color: white;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

.selected-voice {
    margin-top: 9px;
    color: #555;
    font-size: .9em;
}

/* ---------- SCROLLBARY ---------- */
aside.sidebar::-webkit-scrollbar,
section.content::-webkit-scrollbar {
    width: 9px;
}

aside.sidebar::-webkit-scrollbar-track,
section.content::-webkit-scrollbar-track {
    background: transparent;
}

aside.sidebar::-webkit-scrollbar-thumb,
section.content::-webkit-scrollbar-thumb {
    background: rgba(90, 100, 110, .42);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* ---------- MOBIL ---------- */
@media (max-width: 800px) {
    body {
        padding: 8px 0 16px;
    }

    header.topbar {
        width: calc(100% - 16px);
        height: auto;
        min-height: 46px;
        padding: 4px 8px;
        margin-bottom: 10px;
    }

    nav.top-nav ul {
        flex-wrap: wrap;
        gap: 2px;
    }

    nav.top-nav a {
        padding: 7px 9px;
        font-size: .86em;
    }

    main.layout {
        width: calc(100% - 16px);
        flex-direction: column;
        gap: 10px;
    }

    aside.sidebar,
    section.content {
        width: 100%;
        max-height: none;
    }

    aside.sidebar {
        max-height: 300px;
    }

    section.content {
        padding: 14px;
    }

    .voice-selector {
        align-items: stretch;
    }

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

/* ---------- INFORMACE A MULTIMÉDIA PÍSNĚ ---------- */
.song-description {
    margin: 10px 0 14px;
    padding: 11px 14px;
    border-left: 3px solid #397fbb;
    border-radius: 8px;
    background: rgba(255,255,255,.42);
    color: #3d4650;
    line-height: 1.55;
}

.song-media {
    margin: 14px 0 18px;
    padding: 14px 16px;
    background: rgba(235, 242, 248, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 14px;
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.12);
}

.song-media-title {
    margin-bottom: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #33485b;
}

.song-media-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.media-item {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(90, 105, 120, 0.14);
    border-radius: 10px;
}

.media-item-title {
    margin-bottom: 6px;
    font-weight: 600;
    color: #3d5368;
}

.media-item audio {
    width: 100%;
    display: block;
    margin-top: 4px;
}

.media-link {
    display: block;
    color: #245d8e;
    font-weight: 600;
    text-decoration: none;
}

.media-link:hover {
    text-decoration: underline;
}

/* =========================================================
   SAMOSTATNÉ NÁSTROJE – STEJNÝ VZHLED JAKO HLAVNÍ WEB
   ========================================================= */

.page-bubble {
    width: calc(100% - 32px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px;
    background: rgba(220, 235, 245, 0.80);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,.58);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.28), 0 1px 2px rgba(0,0,0,.18);
    color: #222;
}

.page-title {
    padding: 18px 2px 12px;
    border-bottom: 1px solid rgba(40,40,40,.22);
    margin-bottom: 10px;
}

.page-title h1 {
    margin: 0;
    color: #222;
    font-size: 1.55em;
    font-weight: 400;
    letter-spacing: .2px;
    text-shadow: none;
}

.page-bubble main {
    max-width: none;
    padding: 8px 0 0;
}

.page-bubble .chord-nav {
    max-width: none;
    margin: 10px 0 14px;
    padding: 10px;
    background: rgba(255,255,255,.34);
    border: 1px solid rgba(80,100,120,.18);
    border-radius: 10px;
    box-shadow: none;
    backdrop-filter: blur(5px);
}

.page-bubble .instrument-toolbar {
    max-width: none;
    padding: 0;
    margin: 0 0 10px;
}

.page-bubble .fretboard-container,
.page-bubble .piano-container {
    border-radius: 10px;
}

.page-bubble footer {
    margin: 24px 0 0;
    padding: 16px 10px 4px;
    background: transparent;
    border-top: 1px solid rgba(40,40,40,.16);
    color: #56616c;
}

/* Hlasový trenér */
body:has(.app-root) {
    background: url('images/pozadi.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    padding: 12px 0 24px;
    overflow-x: hidden;
}

.site-topbar {
    width: calc(100% - 32px);
    max-width: 1200px;
    min-height: 46px;
    margin: 0 auto 14px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(73,160,218,.92), rgba(34,112,174,.92));
    border: 1px solid rgba(0,92,160,.75);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.28), 0 1px 2px rgba(0,0,0,.18);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.site-logo { display: none; }
.site-nav { display:flex; align-items:center; justify-content:center; gap:4px; flex-wrap:wrap; }
.site-nav a {
    color:#fff; text-decoration:none; padding:7px 18px; border-radius:6px;
    font-weight:600; letter-spacing:.2px; text-shadow:0 1px 2px rgba(0,0,0,.25);
}
.site-nav a:hover, .site-nav a.active { background:rgba(255,255,255,.18); }

body:has(.app-root) .app-root {
    width: calc(100% - 32px);
    max-width: 1200px;
    height: calc(100vh - 84px);
    min-height: 520px;
    margin: 0 auto;
    border: 1px solid rgba(255,255,255,.58);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.28), 0 1px 2px rgba(0,0,0,.18);
}

@media (max-width: 768px) {
    .page-bubble, .site-topbar, body:has(.app-root) .app-root { width: calc(100% - 20px); }
    .site-topbar { padding: 6px 8px; }
    .site-nav { gap: 2px; }
    .site-nav a { padding: 6px 9px; font-size: .82em; }
    body:has(.app-root) .app-root { height: calc(100vh - 104px); min-height: 480px; }
}


.song-downloads{margin:14px 0 18px;padding:14px 16px;background:rgba(235,242,248,.72);border:1px solid rgba(255,255,255,.65);border-radius:14px;box-shadow:0 7px 18px rgba(0,0,0,.12)}
.song-download-list{display:flex;flex-direction:column;gap:8px}
.download-item{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:10px;background:rgba(255,255,255,.48);border:1px solid rgba(90,105,120,.14);color:#245d8e;text-decoration:none;transition:background .2s,transform .15s,box-shadow .2s}
.download-item:hover{background:rgba(255,255,255,.82);transform:translateY(-1px);box-shadow:0 3px 10px rgba(0,0,0,.08)}
.download-icon{width:34px;height:34px;display:grid;place-items:center;flex:0 0 34px;border-radius:50%;background:rgba(57,127,187,.14);font-size:1.25em;font-weight:700}
.download-text{display:flex;flex-direction:column;gap:2px;min-width:0}.download-text strong{color:#33485b}.download-text small{color:#68737d;font-size:.82em}
