/* css/custom.css */

:root {
    --primary: #1095c1;
    --primary-hover: #08769b;
    --paper-bg: #fffbf2;
    --paper-ink: #1a1a1a;
    --tile-bg: var(--card-background-color);
    --tile-border: var(--muted-border-color);
    --header-height: 70px;
}

/* --- LANDING PAGE --- */
.card-link {
    text-decoration: none;
    color: inherit;
}
.mode-card {
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--muted-border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}
.mode-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

/* --- LAYOUT GRID (SIDEBAR + PAPER) --- */
.app-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
    padding-top: 1rem;
}

.settings-sidebar {
    background: var(--card-background-color);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--muted-border-color);
    height: calc(100vh - var(--header-height) - 2rem);
    overflow-y: auto;
    position: sticky;
    top: calc(var(--header-height) + 1rem);
}

.paper-area {
    min-width: 0; /* Prevents overflow in grid */
}

/* --- STICKY HEADER RE-DESIGN --- */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background-color: var(--background-color);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--muted-border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.back-btn {
    text-decoration: none;
    font-weight: bold;
    color: var(--muted-color);
}
.back-btn:hover { color: var(--primary); }

.header-center {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.header-right {
    display: flex;
    gap: 0.5rem;
}

/* Slider Compact Styling for Header */
.slider-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 150px;
}
.slider-group label { margin: 0; font-size: 0.75rem; display: flex; justify-content: space-between; }
.slider-group input { margin: 0; height: 1.5rem; }

/* --- SHEET MUSIC --- */
.paper-container {
    background-color: var(--paper-bg) !important;
    color: var(--paper-ink) !important;
    padding: 40px 20px;
    border-radius: 4px;
    border: 1px solid #e0d8c0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow-x: auto;
    text-align: center;
    min-height: 300px;
}

#notation svg {
    background-color: transparent;
    fill: var(--paper-ink);
    width: 100%;
}

.paper-watermark {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.8rem;
    color: #dcd6c5;
    text-transform: uppercase;
    font-weight: bold;
    pointer-events: none;
}

/* --- TILE SELECTORS --- */
.setting-block { margin-bottom: 1.5rem; }
.label-title {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
    color: var(--muted-color);
    margin-bottom: 0.5rem;
}
.tile-grid { display: flex; flex-wrap: wrap; gap: 6px; }

.tile { margin: 0 !important; cursor: pointer; }
.tile input { position: absolute; opacity: 0; width: 0; height: 0; }
.tile span {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--tile-bg);
    border: 1px solid var(--tile-border);
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s;
    user-select: none;
}
.tile:hover span { border-color: var(--primary); }
.tile input:checked + span {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(16, 149, 193, 0.3);
}
.tile.radio span { border-radius: 20px; }

.range-wrapper { display: flex; align-items: center; gap: 10px; }
.badge { background: var(--primary); color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.8em; }

.alert-box {
    font-size: 0.85rem;
    color: var(--muted-color);
    margin-top: 1rem;
}

.full-width { width: 100%; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.9rem; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .app-grid { grid-template-columns: 1fr; }
    .settings-sidebar { position: relative; height: auto; top: 0; order: 2; }
    .paper-area { order: 1; margin-bottom: 2rem; }
    .header-center { display: none; } /* Hide sliders in header on mobile, move to sidebar? Or keep simplified */
}

@media (max-width: 768px) {
    .landing-grid { grid-template-columns: 1fr; }
    .hide-mobile { display: none; }
}


/* --- SEGMENTED CONTROL (Tabs in Sidebar) --- */
.segmented-control {
    display: flex;
    background: var(--tile-bg);
    border: 1px solid var(--tile-border);
    border-radius: 6px;
    padding: 3px;
    margin-bottom: 1rem;
}

.segmented-control label {
    flex: 1;
    text-align: center;
    margin: 0;
    cursor: pointer;
}

.segmented-control input {
    display: none;
}

.segmented-control span {
    display: block;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--muted-color);
    transition: all 0.2s;
}

.segmented-control input:checked + span {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* --- LIST RADIOS (Compact list for Hands) --- */
.list-radios {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.list-radios label {
    font-size: 0.85rem;
    cursor: pointer;
    margin-bottom: 0;
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.list-radios input {
    margin: 0;
}
