/*
 * Water Flow — Settings & Pause Screen Styles (Module 06)
 * High-fidelity glassmorphic casual game UI matching the redesigned reference.
 */

/* ────────────────────────────────────────
   Settings Page Container
   ──────────────────────────────────────── */

.settings-page {
    background: #06172A url('../assets/images/innerpage.png') no-repeat center top / cover;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100dvh;
    padding-top: calc(var(--safe-top) + 12px);
    padding-bottom: calc(var(--safe-bottom) + 20px);
    user-select: none;
    -webkit-user-select: none;
    overflow-y: auto;
    position: relative;
    max-width: 480px;
    margin: 0 auto;
}

/* Background Video (innervideo.mp4) */
.settings-bg-video {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    pointer-events: none;
    z-index: 0;
    opacity: 0.65;
}

/* Ambient Underwater Caustic Light Rays Overlay */
.settings-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: radial-gradient(
        ellipse at 50% 5%,
        rgba(56, 189, 248, 0.25) 0%,
        rgba(14, 165, 233, 0.1) 40%,
        rgba(6, 23, 42, 0.82) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Main Content Area */
.settings__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 18px 24px;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 5;
}

/* ════════════════════════════════════
   Top Navigation Header
   ════════════════════════════════════ */
.settings-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 2px 2px 8px;
    z-index: 10;
}

.settings-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(10, 26, 47, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(56, 189, 248, 0.3);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.settings-nav-btn:hover {
    background: rgba(14, 38, 68, 0.85);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 14px rgba(56, 189, 248, 0.35);
}

.settings-nav-btn:active {
    transform: scale(0.92);
}

.settings-nav-title {
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #FFFFFF;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), 0 0 18px rgba(56, 189, 248, 0.4);
    margin: 0;
}

/* ════════════════════════════════════
   Glassmorphic Settings Cards
   ════════════════════════════════════ */

.settings-group {
    background: rgba(10, 26, 47, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(56, 189, 248, 0.28);
    border-radius: 28px;
    padding: 22px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6),
                inset 0 1px 2px rgba(255, 255, 255, 0.18),
                0 0 24px rgba(0, 180, 216, 0.1);
    position: relative;
    overflow: hidden;
}

/* Shimmer highlight overlay */
.settings-group::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    border-radius: 28px 28px 0 0;
}

.settings-group__title {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #38BDF8;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
    margin: 0;
    z-index: 2;
}

/* ────────────────────────────────────────
   Settings Rows & Items
   ──────────────────────────────────────── */

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 2;
}

.settings-row__left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.settings-row__icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.25) 0%, rgba(3, 105, 161, 0.15) 100%);
    border: 1.5px solid rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38BDF8;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(0, 180, 216, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.settings-row__icon svg {
    width: 20px;
    height: 20px;
}

.settings-row__label-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-row__label {
    font-size: 0.95rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: 0.2px;
}

.settings-row__desc {
    font-size: 0.75rem;
    color: #94A3B8;
    font-weight: 500;
}

/* ────────────────────────────────────────
   3D Glossy Toggle Switch
   ──────────────────────────────────────── */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 30px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: #FFFFFF;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45), inset 0 -1px 1px rgba(0, 0, 0, 0.15);
}

input:checked + .toggle-slider {
    background: linear-gradient(180deg, #00D2FF 0%, #0096C7 100%);
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 0 14px rgba(0, 210, 255, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
    background: #FFFFFF;
}

/* ────────────────────────────────────────
   Volume Slider Row
   ──────────────────────────────────────── */

.volume-slider-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 2px 4px;
    z-index: 2;
}

.volume-slider-wrap span:first-child {
    font-size: 0.8rem;
    font-weight: 800;
    color: #94A3B8;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(180deg, #00E5FF 0%, #0096C7 100%);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.8), 0 2px 5px rgba(0, 0, 0, 0.4);
    border: 2px solid #FFFFFF;
    transition: transform 0.1s ease;
}

.volume-slider::-webkit-slider-thumb:active {
    transform: scale(1.15);
}

#setting-vol-label {
    font-size: 0.82rem;
    font-weight: 900;
    color: #38BDF8;
    min-width: 38px;
    text-align: right;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* ────────────────────────────────────────
   Data Management Buttons
   ──────────────────────────────────────── */

.settings-btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    z-index: 2;
}

.settings-btn-secondary {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(56, 189, 248, 0.25);
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #E0F2FE;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.18s ease;
}

.settings-btn-secondary:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), 0 0 14px rgba(56, 189, 248, 0.25);
    transform: translateY(-1px);
}

.settings-btn-secondary:active {
    transform: scale(0.96);
}

/* Reset Danger Zone */
.settings-danger-card {
    background: rgba(239, 68, 68, 0.06);
    border: 1.5px solid rgba(239, 68, 68, 0.2);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
    margin-top: 4px;
}

.settings-btn-danger {
    width: 100%;
    max-width: 280px;
    height: 48px;
    padding: 0 18px;
    background: rgba(239, 68, 68, 0.15);
    border: 1.5px solid rgba(239, 68, 68, 0.45);
    border-radius: 16px;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #FCA5A5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    transition: all 0.18s ease;
}

.settings-btn-danger svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    color: #EF4444;
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.6));
}

.settings-btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.7);
    color: #FFFFFF;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

.settings-btn-danger:active {
    transform: scale(0.96);
}

.settings-footer-note {
    text-align: center;
    font-size: 0.75rem;
    color: #64748B;
    font-weight: 600;
    margin-top: 4px;
    z-index: 2;
}

/* ────────────────────────────────────────
   In-Game Pause Modal
   ──────────────────────────────────────── */

.pause-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 14, 26, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.pause-overlay--visible {
    opacity: 1;
    visibility: visible;
}

.pause-card {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: linear-gradient(
        165deg,
        rgba(15, 39, 68, 0.96) 0%,
        rgba(11, 25, 41, 0.98) 60%,
        rgba(6, 14, 26, 0.99) 100%
    );
    border: 1.5px solid rgba(0, 180, 216, 0.28);
    border-radius: var(--radius-xxl);
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6),
                0 0 35px rgba(0, 180, 216, 0.2);
    transform: scale(0.88);
    opacity: 0;
    transition: transform 250ms cubic-bezier(0.2, 0.9, 0.3, 1.2),
                opacity 220ms ease;
}

.pause-overlay--visible .pause-card {
    transform: scale(1);
    opacity: 1;
}

.pause-card__title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--white);
    margin: 0 0 4px;
}

.pause-card__subtitle {
    font-size: var(--font-size-sm);
    color: var(--primary-light);
    margin-bottom: var(--space-lg);
}

.pause-card__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
