:root {
    --bg-color: #f4f7f6;
    --primary-color: #3a6073;
    --accent-color: #3a7bd5;
    --text-color: #2c3e50;
    --border-color: #e2e8f0;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --muted-text: #64748b;
}

body.dark-mode {
    --bg-color: #0f172a;
    --primary-color: #93c5fd;
    --accent-color: #60a5fa;
    --text-color: #e2e8f0;
    --border-color: #334155;
    --light-bg: #1e293b;
    --card-bg: #1e293b;
    --muted-text: #94a3b8;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 16px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 100%;
    max-width: 520px;
    background: var(--card-bg);
    padding: 28px 22px;
    border-radius: 18px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 28px;
    transition: background-color 0.3s;
}

/* Header */
.header {
    text-align: center;
}

h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 6px 0;
}

h2 {
    font-size: 16px;
    font-weight: 500;
    color: var(--muted-text);
    margin: 0 0 16px 0;
}

/* Buttons row (Learn More + Night Mode) */
.header-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.theme-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--muted-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 20px;
    transition: all 0.2s;
    font-family: inherit;
}

.theme-btn:hover {
    background: var(--light-bg);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* App Switcher Dropdown */
.app-switcher {
    margin-top: 4px;
}

.app-switcher select {
    width: 100%;
    max-width: 280px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s, background-color 0.2s;
    font-family: inherit;
}

.app-switcher select:hover,
.app-switcher select:focus {
    border-color: var(--primary-color);
    outline: none;
}

body.dark-mode .app-switcher select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* Volume Section */
.volume-section {
    background: var(--light-bg);
    border: 2px dashed var(--border-color);
    border-radius: 14px;
    padding: 20px 16px;
    transition: background-color 0.3s, border-color 0.3s;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    text-align: center;
}

.volume-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #3a6073, #3a7bd5);
    color: white;
    text-decoration: none;
    text-align: center;
    padding: 16px 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    transition: opacity 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(58, 96, 115, 0.25);
}

.volume-btn:hover {
    opacity: 0.93;
}

.volume-btn:active {
    transform: scale(0.98);
}

/* Footer */
.footer {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    min-height: 1px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1000;
    padding: 16px;
}

.modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--card-bg);
    padding: 28px 22px;
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    text-align: left;
    color: var(--text-color);
    transition: background-color 0.3s;
}

.modal-content h3 {
    margin: 0 0 18px 0;
    color: var(--primary-color);
    font-size: 19px;
    text-align: center;
}

.learn-more-text p {
    font-size: 15.5px;
    line-height: 1.65;
    margin: 0 0 14px 0;
    color: var(--text-color);
}

.signature {
    margin-top: 20px !important;
    font-style: italic;
}

.btn-back {
    display: block;
    width: 100%;
    margin-top: 22px;
    background: #e2e8f0;
    color: #334155;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

body.dark-mode .btn-back {
    background: #334155;
    color: #e2e8f0;
}

.btn-back:hover {
    background: #cbd5e1;
}

body.dark-mode .btn-back:hover {
    background: #475569;
}

/* Mobile */
@media (max-width: 480px) {
    body {
        padding: 12px;
    }
    
    .container {
        padding: 22px 16px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 15px;
    }

    .header-buttons {
        gap: 10px;
    }
}
