/* ============================================================================
   VOID GROUND - SETTINGS PAGE (RENAISSANCE DA VINCI CODEX & PARCHMENT VIEW)
   ============================================================================ */
.settings-page-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #100804 url('assets/wood-table.jpg') center center / cover no-repeat;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 16px;
    font-family: 'Cinzel', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
    color: #2b1d0c;
    overflow: hidden;
}

.settings-page-view.hidden {
    display: none !important;
}

/* Leather-bound Codex Cover */
.settings-ledger-card {
    background: #2b170a url('assets/leather-cover.jpg') repeat;
    border: 3px solid #5a3416;
    border-radius: 12px;
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.92),
        0 10px 28px rgba(20, 10, 5, 0.8),
        inset 0 0 36px rgba(0, 0, 0, 0.65);
    width: 92%;
    max-width: 980px;
    box-sizing: border-box;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    position: relative;
    max-height: 94%;
    overflow: hidden;
}

/* Aged Parchment Manuscript Sheet Inside Leather Cover */
.settings-parchment-sheet {
    position: relative;
    background: #f4ebd6 url('assets/deckle-paper.jpg') repeat;
    background-size: cover;
    border: 2px solid #8c5d2e;
    border-radius: 8px;
    box-shadow:
        inset 0 0 50px rgba(90, 56, 20, 0.25),
        0 4px 14px rgba(0, 0, 0, 0.45);
    padding: 24px 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    color: #2b1d0c;
}

.settings-parchment-sheet::-webkit-scrollbar {
    width: 6px;
}

.settings-parchment-sheet::-webkit-scrollbar-track {
    background: rgba(120, 53, 15, 0.08);
    border-radius: 4px;
}

.settings-parchment-sheet::-webkit-scrollbar-thumb {
    background: #8c5d2e;
    border-radius: 4px;
}

/* Renaissance Brass Corners */
.settings-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 2;
}

.settings-corner.tl {
    top: 8px;
    left: 8px;
    border-top: 2.5px solid #a67c38;
    border-left: 2.5px solid #a67c38;
}

.settings-corner.tr {
    top: 8px;
    right: 8px;
    border-top: 2.5px solid #a67c38;
    border-right: 2.5px solid #a67c38;
}

.settings-corner.bl {
    bottom: 8px;
    left: 8px;
    border-bottom: 2.5px solid #a67c38;
    border-left: 2.5px solid #a67c38;
}

.settings-corner.br {
    bottom: 8px;
    right: 8px;
    border-bottom: 2.5px solid #a67c38;
    border-right: 2.5px solid #a67c38;
}

/* Header */
.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #7c5828;
    padding-bottom: 14px;
}

.settings-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-title {
    font-size: 26px;
    font-weight: 800;
    color: #381f08;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-title-icon {
    color: #78350f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.settings-subtitle {
    font-family: 'EB Garamond', 'Georgia', serif;
    font-size: 14px;
    font-weight: 600;
    color: #7c5828;
    letter-spacing: 1px;
}

.settings-close-btn {
    background: #451a03;
    border: 2px solid #8c5d2e;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fef3c7;
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.settings-close-btn:hover {
    background: #78350f;
    border-color: #b48a46;
    transform: scale(1.06);
}

/* Settings Items */
.settings-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-item {
    background: rgba(255, 250, 238, 0.56);
    border: 1.5px solid rgba(124, 88, 40, 0.42);
    border-radius: 8px;
    box-shadow: inset 0 1px 6px rgba(90, 56, 20, 0.08);
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-item-label {
    font-size: 17px;
    font-weight: 800;
    color: #381f08;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-item-icon {
    color: #78350f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.settings-item-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    font-size: 15px;
    font-weight: 800;
    color: #381f08;
    background: rgba(120, 53, 15, 0.12);
    padding: 4px 14px;
    border-radius: 6px;
    border: 1.5px solid #8c5d2e;
}

/* Language Segmented Buttons */
.settings-lang-switch {
    display: flex;
    gap: 14px;
    margin-top: 4px;
}

.settings-lang-pill {
    flex: 1;
    background: linear-gradient(180deg, #eadbc0 0%, #d8c29e 100%);
    border: 1.5px solid #8c673b;
    border-radius: 6px;
    padding: 13px 20px;
    color: #4a2f13;
    font-size: 16px;
    font-weight: 800;
    font-family: 'Cinzel', Georgia, serif;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(45, 24, 6, 0.15);
}

.settings-lang-code {
    font-size: 12px;
    letter-spacing: 1px;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(90, 56, 20, 0.14);
    border: 1px solid rgba(90, 56, 20, 0.35);
    color: inherit;
}

.settings-lang-pill:hover {
    border-color: #6e4a21;
    background: linear-gradient(180deg, #f3e8d2 0%, #e3cfb0 100%);
    color: #2b1807;
}

.settings-lang-pill.active {
    background: linear-gradient(180deg, #78350f 0%, #4e2208 100%);
    border-color: #381f08;
    color: #fef3c7;
    box-shadow: inset 0 1px 0 rgba(255, 224, 168, 0.28), 0 3px 8px rgba(43, 24, 7, 0.35);
}

.settings-lang-pill.active .settings-lang-code {
    background: rgba(254, 243, 199, 0.16);
    border-color: rgba(254, 243, 199, 0.4);
}

/* Audio Sliders & Stepper Buttons */
.settings-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.settings-vol-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #dfcfb2 0%, #c4ab84 100%);
    border: 2px solid #6e4a21;
    border-radius: 6px;
    color: #3b230f;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(43, 24, 7, 0.22);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.settings-vol-btn:hover {
    border-color: #451a03;
    background: linear-gradient(180deg, #ebdcc3 0%, #d4bc94 100%);
    color: #2b1807;
}

.settings-vol-btn:active {
    transform: scale(0.94);
    background: #b89b6d;
    border-color: #381f08;
}

.settings-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 10px;
    background: #d6c3a3;
    border-radius: 5px;
    outline: none;
    border: 1.5px solid #8c673b;
    box-shadow: inset 0 1px 3px rgba(43, 24, 7, 0.28);
    cursor: pointer;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(180deg, #d4ab68 0%, #9b6b28 100%);
    border: 2px solid #381f08;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 245, 210, 0.6);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.settings-slider::-webkit-slider-thumb:hover {
    transform: scale(1.12);
}

.settings-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(180deg, #d4ab68 0%, #9b6b28 100%);
    border: 2px solid #381f08;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 245, 210, 0.6);
    cursor: pointer;
}

.settings-lang-pill:focus-visible,
.settings-vol-btn:focus-visible,
.settings-close-btn:focus-visible,
.settings-back-btn:focus-visible,
.settings-slider:focus-visible {
    outline: 2px solid #78350f;
    outline-offset: 2px;
}

/* Footer Button */
.settings-footer {
    display: flex;
    justify-content: center;
    border-top: 2px solid rgba(124, 88, 40, 0.35);
    padding-top: 18px;
}

.settings-back-btn {
    background: linear-gradient(180deg, #78350f 0%, #4e2208 100%);
    border: 2px solid #b48a46;
    border-radius: 8px;
    color: #fef3c7;
    font-size: 16px;
    font-weight: 800;
    padding: 13px 52px;
    cursor: pointer;
    font-family: 'Cinzel', Georgia, serif;
    letter-spacing: 1.5px;
    transition: all 0.18s ease;
    box-shadow: 0 4px 12px rgba(43, 24, 7, 0.38);
}

.settings-back-btn:hover {
    background: linear-gradient(180deg, #8c4115 0%, #5c290b 100%);
    border-color: #d4ab68;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(43, 24, 7, 0.45);
}

/* Mobile & Touchscreen Optimization */
@media (max-width: 640px) {
    .settings-page-view {
        padding: 8px;
    }
    .settings-ledger-card {
        padding: 10px 10px;
        max-height: 95%;
    }
    .settings-parchment-sheet {
        padding: 18px 16px;
        gap: 14px;
    }
    .settings-title {
        font-size: 20px;
    }
    .settings-item {
        padding: 12px 14px;
        gap: 8px;
    }
    .settings-vol-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        font-size: 20px;
        flex-shrink: 0;
    }
    .settings-slider-wrapper {
        gap: 10px;
    }
}

