:root {
    --fx-deep: #0c363f;
    --fx-primary: #165b66;
    --fx-mint: #48c9b0;
    --fx-mint-light: #eef9f8;
    --fx-surface: #ffffff;
    --fx-border: #d4e7e6;
    --fx-text-muted: #5a767d;
    --fx-gradient: linear-gradient(135deg, #0c363f 0%, #165b66 50%, #48c9b0 100%);
    --fx-shadow: 0 4px 14px rgba(12, 54, 63, 0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--fx-deep);
    background-color: #f7fbfa;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header & Mobile-First Nav */
.header {
    background: var(--fx-surface);
    border-bottom: 1px solid var(--fx-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--fx-deep);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--fx-mint);
}

.nav-links {
    display: flex;
    gap: 1.2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--fx-deep);
    font-weight: 600;
    font-size: 2rem;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--fx-mint);
}

/* Layout Containers */
.container {
    width: 100%;
    padding: 1.5rem 1.25rem;
    margin: 0 auto;
}

/* Hero & Section Typography */
.hero {
    background: var(--fx-gradient);
    color: #ffffff;
    padding: 2.5rem 1.25rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: var(--fx-shadow);
}

.hero h1 {
    font-size: 1.8rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.hero p {
    font-size: 1rem;
    opacity: 0.92;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

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

.btn-primary {
    background: var(--fx-mint);
    color: var(--fx-deep);
}

.btn-dark {
    background: var(--fx-deep);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--fx-mint);
    color: #ffffff;
}

/* Responsive Grid / Cards */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.card {
    background: var(--fx-surface);
    border: 1px solid var(--fx-border);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--fx-shadow);
    display: flex;
    flex-direction: column;
}

.badge {
    align-self: flex-start;
    background: var(--fx-mint-light);
    color: var(--fx-primary);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

/* Chapter / Reader Specifics */
.chapter-container {
    background: var(--fx-surface);
    border: 1px solid var(--fx-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--fx-shadow);
}

.chapter-nav {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--fx-border);
}

/* Footer */
footer {
    border-top: 1px solid var(--fx-border);
    background: var(--fx-surface);
    padding: 1.5rem 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--fx-text-muted);
    margin-top: 3rem;
}

        .nav-icon-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            text-decoration: none;
            color: var(--fx-deep);
            font-weight: 600;
            font-size: 0.95rem;
            padding: 6px 10px;
            border-radius: 8px;
            transition: background 0.2s, color 0.2s;
        }
        .nav-icon-link:hover {
            background: var(--fx-mint-light);
            color: var(--fx-primary);
        }
        .nav-icon-link.logout-link:hover {
            background: #fff5f5;
            color: #c92a2a;
        }
        .nav-icon-link svg {
            width: 18px;
            height: 18px;
            stroke-width: 2.2;
            fill: none;
            stroke: currentColor;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .reset-card {
            max-width: 480px;
            margin: 2.5rem auto;
            background: var(--fx-surface);
            border: 1px solid var(--fx-border);
            border-radius: 12px;
            padding: 2rem 1.5rem;
            box-shadow: var(--fx-shadow);
        }
        .form-group {
            margin-bottom: 1.25rem;
        }
        .form-group label {
            display: block;
            margin-bottom: 0.35rem;
            font-size: 0.88rem;
            font-weight: 600;
            color: var(--fx-deep);
        }
        .form-control {
            width: 100%;
            padding: 0.75rem 0.9rem;
            border: 1px solid var(--fx-border);
            border-radius: 8px;
            font-size: 0.95rem;
            box-sizing: border-box;
            outline: none;
            transition: border-color 0.2s;
        }
        .form-control:focus {
            border-color: var(--fx-primary);
        }
        .alert-error {
            background: #fff5f5;
            color: #e03131;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            border: 1px solid #ffc9c9;
            font-size: 0.9rem;
            margin-bottom: 1.25rem;
        }
        .alert-success {
            background: #e6fcf5;
            color: #0ca678;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            border: 1px solid #96f2d7;
            font-size: 0.9rem;
            margin-bottom: 1.25rem;
        }

/* Tablet & Desktop Enhancements */
@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero {
        padding: 3.5rem 2.5rem;
    }
    .hero h1 {
        font-size: 2.3rem;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1050px;
    }
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}