* {
    box-sizing: border-box;
}
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 20px;
    background: #eef2f3;
    color: #333;
}
.container {
    max-width: 1500px;
    margin: auto;
}
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2em;
}
.hint {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 0.95em;
    color: #856404;
    text-align: center;
}
.reward-banner {
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 1em;
    color: #155724;
    text-align: center;
    font-weight: 500;
}
.reward-banner #reward-minutes {
    font-size: 1.2em;
    font-weight: bold;
    color: #28a745;
}
.main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: start;
}
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}
.box {
    padding: 22px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.text-theme {
    border-left: 5px solid #e67e22;
}
.mic-theme {
    border-left: 5px solid #28a745;
}
.partial-theme {
    border-left: 5px solid #9b59b6;
}
.report-theme {
    border-left: 5px solid #3498db;
}
.mono-theme {
    border-left: 5px solid #007bff;
}
.stereo-theme {
    border-left: 5px solid #6f42c1;
}
.log-theme {
    border-left: 5px solid #6c757d;
}
.settings-theme {
    border-left: 5px solid #17a2b8;
}
details.settings-details > summary {
    cursor: pointer;
    font-weight: 700;
    color: #2c3e50;
    list-style: none;
    user-select: none;
}
details.settings-details > summary::-webkit-details-marker {
    display: none;
}
.settings-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.settings-summary small {
    font-weight: 600;
    color: #6c757d;
}
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px 18px;
    margin-top: 14px;
}
.settings-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.settings-field label {
    font-size: 0.9em;
    color: #2c3e50;
    font-weight: 600;
}
.settings-field input[type="text"],
.settings-field input[type="number"] {
    padding: 10px 12px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.95em;
}
.settings-field input[type="checkbox"] {
    transform: scale(1.05);
}
.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    align-items: center;
}
.btn-small {
    padding: 10px 14px;
    font-size: 0.9em;
    border-radius: 8px;
}
.btn-reset {
    background: #6c757d;
    color: white;
}
.btn-reset:hover {
    background: #5a6268;
}
.btn-export {
    background: #17a2b8;
    color: white;
}
.btn-export:hover {
    background: #138496;
}
.settings-note {
    margin-top: 10px;
    font-size: 0.88em;
    color: #6c757d;
}
h2 {
    margin: 0 0 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25em;
}
.step-badge {
    display: inline-block;
    color: white;
    font-size: 0.55em;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 700;
}
.s1 {
    background: #e67e22;
}
.s2 {
    background: #28a745;
}
.s3 {
    background: #3498db;
}
.s-partial {
    background: #9b59b6;
}
.text-resizable {
    resize: both;
    overflow: hidden;
    min-height: 200px;
    height: 390px;
    max-height: none;
}
.text-resizable textarea,
.text-resizable #original-highlight {
    width: 100%;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
}
#original-text {
    width: 100%;
    max-width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.15em;
    line-height: 1.7;
    resize: none;
    font-family: Georgia, "Times New Roman", serif;
    color: #2c3e50;
}
#original-text:focus {
    border-color: #e67e22;
    outline: none;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}
.word-count {
    text-align: right;
    font-size: 0.85em;
    color: #999;
    margin-top: 5px;
}
.status {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    margin-bottom: 8px;
}
.timer {
    font-size: 2.4em;
    font-weight: bold;
    text-align: center;
    margin: 12px 0;
    font-family: Consolas, "Courier New", monospace;
    color: #2c3e50;
}
button {
    cursor: pointer;
    padding: 14px 24px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    transition: all 0.2s;
    font-size: 1em;
}
.btn-mic {
    background: #28a745;
    color: white;
    width: 100%;
    font-size: 1.15em;
    margin-bottom: 15px;
}
.btn-mic:hover {
    background: #218838;
}
.btn-stop {
    background: #dc3545 !important;
}
.btn-stop:hover {
    background: #c82333 !important;
}
.btn-check {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    width: auto;
    display: block;
    margin: 0 auto 20px auto;
    font-size: 1.2em;
    padding: 14px 20px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}
.btn-check:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
}
.btn-check:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}
.result-box {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 1em;
    line-height: 1.5;
}
.result-full {
    height: 390px;
    font-size: 1.05em;
    color: #1a1a2e;
    background: #eef7ee;
    border-color: #b5d6b2;
    font-family: Consolas, "Courier New", monospace;
}
.result-partial {
    height: 390px;
    font-size: 1.05em;
    color: #2c1a4e;
    background: #f3eef9;
    border-color: #c4a8d8;
    font-family: Consolas, "Courier New", monospace;
}
.partial-word {
    display: inline-block;
    margin: 2px 4px;
    padding: 2px 6px;
    background: #e8daf0;
    border-radius: 4px;
}
.partial-word .pw-time {
    color: #9b59b6;
    font-size: 0.8em;
    margin-right: 4px;
}
.partial-word .pw-text {
    color: #2c1a4e;
    font-weight: 600;
}
.report-content {
    min-height: 200px;
    max-height: 700px;
    overflow-y: auto;
    padding: 20px;
    background: #fafcff;
    border: 1px solid #d0e3f7;
    border-radius: 8px;
    line-height: 1.7;
    font-size: 1.05em;
}
.report-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border: 1px solid #ddd;
}
.report-content td,
.report-content th {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
.report-content tr:nth-child(even) {
    background: #f2f2f2;
}
.report-content h3 {
    color: #2c3e50;
    margin: 18px 0 8px;
    border-bottom: 2px solid #eee;
    padding-bottom: 4px;
}
.report-content h3:first-child {
    margin-top: 0;
}
.report-content strong {
    color: #c0392b;
}
.spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid #e0e0e0;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 10px;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.15em;
    color: #3498db;
}
.field-label {
    font-weight: 700;
    font-size: 0.8em;
    text-transform: uppercase;
    color: #888;
    margin: 15px 0 8px;
    letter-spacing: 0.5px;
}
.uploads-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
.btn-upload {
    background: #007bff;
    color: white;
    width: 100%;
    margin-top: 10px;
}
.btn-upload:hover {
    background: #0056b3;
}
.btn-stereo-up {
    background: #6f42c1;
    color: white;
    width: 100%;
    margin-top: 10px;
}
.btn-stereo-up:hover {
    background: #59359a;
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9em;
}
input[type="file"] {
    border: 1px solid #ddd;
    padding: 8px;
    width: 100%;
    border-radius: 4px;
}
.debug-box {
    margin-top: 15px;
    padding: 10px;
    background: #2c3e50;
    color: #f8f9fa;
    border-radius: 6px;
    font-family: Consolas, monospace;
    font-size: 0.85em;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #444;
}
.debug-label {
    font-weight: bold;
    color: #ff6b6b;
    margin-bottom: 5px;
    display: block;
}
.highlight-box {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.15em;
    line-height: 1.7;
    background: white;
    font-family: Georgia, "Times New Roman", serif;
    color: #2c3e50;
    overflow-y: auto;
}
.word {
    display: inline-block;
    margin: 0 2px;
    padding: 0 2px;
}
.word.read {
    background-color: #c8e6c9;
    border-radius: 4px;
}
.word.error {
    background-color: #ffcdd2;
    border-radius: 4px;
    text-decoration: line-through;
}
.paragraph {
    margin: 0;
    padding: 0;
}

/* Dashboard Styles */
.dashboard-body {
    background: #f0f4f8;
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
}
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}
.dashboard-header {
    text-align: center;
    margin-bottom: 50px;
}
.dashboard-header h1 {
    font-size: 3rem;
    color: #2c3e50;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
.dashboard-header p {
    font-size: 1.2rem;
    color: #7f8c8d;
}
.auth-panel {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.auth-panel form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.auth-panel input[type="text"],
.auth-panel input[type="password"] {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d0d7de;
    min-width: 140px;
    font-size: 0.9rem;
}
.auth-panel button {
    padding: 8px 14px;
    font-size: 0.9rem;
}
.auth-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #2c3e50;
}
.auth-error {
    color: #e74c3c;
    font-size: 0.85rem;
}

/* Google login button */
.google-btn {
    background: #ffffff;
    color: #444;
    border: 1px solid #d0d7de;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 600;
}
.google-btn:hover {
    background: #f5f5f5;
}

/* Registration modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-backdrop.visible {
    display: flex;
}
.modal-content {
    max-width: 420px;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    padding: 24px 24px 20px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}
.modal-close {
    background: transparent;
    padding: 4px 8px;
    font-size: 1.1rem;
}
.modal-form-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}
.modal-form-grid label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
}
.modal-form-grid input,
.modal-form-grid select {
    margin-top: 4px;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid #d0d7de;
    font-size: 0.95rem;
}
/* Блок полей ребёнка в модалке регистрации (скрывается для аккаунта родителя) */
.register-child-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.modal-footer {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}
.btn-primary {
    background: #3498db;
    color: #ffffff;
}
.btn-primary:hover {
    background: #2980b9;
}
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    margin-bottom: 12px;
    background: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}
.btn-download:hover {
    background: #2980b9;
}

/* --- Install modal (WLock) --- */
.install-modal-content,
#install-modal .install-modal-content {
    position: relative;
    overflow: hidden;
}

#install-modal {
    background: radial-gradient(circle at top, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.68));
    backdrop-filter: blur(3px);
}

.install-modal-content {
    max-width: 620px;
    border: 1px solid rgba(147, 197, 253, 0.35);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.34);
    background: linear-gradient(160deg, #ffffff 0%, #f8fbff 55%, #eef5ff 100%);
    padding: 22px 22px 20px;
}

.install-modal-content::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -90px;
    width: 270px;
    height: 270px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.28) 0%, rgba(96, 165, 250, 0) 70%);
    pointer-events: none;
}

#install-modal .modal-header {
    align-items: flex-start;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

#install-modal .modal-title {
    font-size: 1.3rem;
    color: #0f172a;
    letter-spacing: 0.01em;
}

#install-modal .modal-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #dbe4ef;
    color: #475569;
    font-size: 1rem;
    line-height: 1;
    transition: all 0.18s ease;
}

#install-modal .modal-close:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    transform: translateY(-1px);
}

.install-modal-icon {
    font-size: 1.35rem;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.install-steps {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.install-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px solid #e6edf5;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.install-step:hover {
    transform: translateY(-1px);
    border-color: #bfdbfe;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.12);
}

.install-step-num {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    margin-top: 2px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.install-step-warning {
    background: #fff7ed;
    border-color: #fed7aa;
}

.install-step-warning .install-step-num {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.install-subtext {
    margin-top: 6px;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
}

.install-actions {
    margin-top: 18px;
}

.install-download-btn {
    width: 100%;
    padding: 13px 16px;
    font-size: 1.05rem;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.install-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.3);
}

.install-warning {
    margin-top: 22px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid #fcd34d;
    background: #fef3c7;
    color: #92400e;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
}

.install-warning .warn-icon {
    font-size: 1.1rem;
    margin-top: 1px;
}

@media (max-width: 520px) {
    .install-modal-content {
        max-width: 92vw;
        padding: 18px 16px 16px;
    }

    .install-step {
        padding: 10px 12px;
    }

    .install-step-num {
        width: 28px;
        height: 28px;
    }
}
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
}
.subject-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: #2c3e50;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.subject-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}
.card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}
.subject-card h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}
.subject-card p {
    color: #7f8c8d;
    line-height: 1.5;
}
.disabled-card {
    opacity: 0.7;
    cursor: not-allowed;
    background: #fdfdfd;
}
.disabled-card:hover {
    transform: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.coming-soon {
    position: absolute;
    top: 20px;
    right: -30px;
    background: #e74c3c;
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.card-reading {
    border-top: 5px solid #3498db;
}
.card-math {
    border-top: 5px solid #e67e22;
}
.card-logic {
    border-top: 5px solid #9b59b6;
}
.card-world {
    border-top: 5px solid #2ecc71;
}

/* Back button for reading page */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #f8f9fa;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    border: 1px solid #dee2e6;
    transition: all 0.2s;
    margin-bottom: 20px;
}
.back-button:hover {
    background-color: #e2e6ea;
    border-color: #dae0e5;
}

/* ================================================================
   MODERN UI — NAVBAR (legacy; главная использует общий topbar)
   ================================================================ */
body[data-ui="modern"] {
    background: #f8f9fb;
    font-family: 'Inter', 'Nunito', sans-serif;
}

.m-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.m-nav-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 28px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.m-nav-logo {
    font-size: 1.2rem;
    font-weight: 900;
    color: #0f172a;
    text-decoration: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.m-nav-logo span {
    color: #3b82f6;
}
.m-nav-links {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.m-nav-link {
    padding: 6px 14px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: background 0.15s, color 0.15s;
}
.m-nav-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.m-nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
}

/* ================================================================
   MODERN UI — HERO
   ================================================================ */
.m-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1e40af 100%);
    color: #ffffff;
    padding: 60px 20px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.m-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -30%;
    width: 160%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(59, 130, 246, 0.25) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
}
.m-hero-inner {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}
.m-hero-kicker {
    margin: 0 0 14px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #93c5fd;
}
.m-hero-title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-align: center;
    color: #ffffff;
}
.m-hero-subtitle {
    margin: 18px auto 0;
    max-width: 540px;
    font-size: 1.05rem;
    line-height: 1.65;
    color: #cbd5e1;
    font-weight: 400;
}
.m-hero-actions {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.m-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.15s, box-shadow 0.15s;
}
.m-cta:hover {
    transform: translateY(-2px);
}
.m-cta-primary {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}
.m-cta-primary:hover {
    box-shadow: 0 8px 22px rgba(59, 130, 246, 0.5);
}
.m-cta-outline {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.m-cta-outline:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* ================================================================
   MODERN UI — SECTION + CARDS
   ================================================================ */
.m-section {
    padding: 40px 20px 20px;
}
.m-section-inner {
    max-width: 900px;
    margin: 0 auto;
}
.m-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 20px;
    text-align: left;
    display: block;
}
.m-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.m-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px 20px;
    text-decoration: none;
    color: #0f172a;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.m-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}
.m-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}
.m-card-icon-reading { background: #dbeafe; }
.m-card-icon-math    { background: #fef3c7; }
.m-card-icon-logic   { background: #ede9fe; }
.m-card-icon-world   { background: #d1fae5; }

.m-card-body {
    flex: 1;
    min-width: 0;
}
.m-card-body h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}
.m-card-body p {
    margin: 0;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.5;
}
.m-card-arrow {
    font-size: 1.3rem;
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}
.m-card:hover .m-card-arrow {
    color: #3b82f6;
    transform: translateX(3px);
}
.m-card-badge {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 10px;
}
.m-card-disabled {
    opacity: 0.65;
    cursor: default;
    pointer-events: none;
}

/* ================================================================
   MODERN UI — FOOTER
   ================================================================ */
.m-footer {
    text-align: center;
    padding: 24px 20px 32px;
}

/* ================================================================
   MODERN UI — RESPONSIVE
   ================================================================ */
@media (max-width: 700px) {
    .m-nav-inner {
        height: auto;
        flex-wrap: wrap;
        padding: 10px 14px;
        gap: 8px;
    }
    .m-nav-links {
        order: 3;
        width: 100%;
    }
    .m-nav-right {
        margin-left: auto;
    }
    .m-hero {
        padding: 40px 16px 36px;
    }
    .m-card {
        padding: 14px 14px;
    }
    .m-card-icon {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
}
