﻿/* ============================================
   DomisLink High School Academy - LARGE UI
   Scaled for desktop and mobile (responsive)
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #D4AF37;
    --primary-dark: #B8962B;
    --primary-light: #F3DF9F;
    --dark: #1E1E2E;
    --dark-card: #2C2C3A;
    --light-bg: #F8F9FC;
    --white: #FFFFFF;
    --gray: #6C6C7A;
    --success: #34C759;
    --error: #FF3B30;
    --font-base: 18px;
    --radius-card: 28px;
    --radius-element: 20px;
    --safe-bottom: env(safe-area-inset-bottom);
}

body {
    background: var(--dark);
    color: var(--white);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: var(--font-base);
    line-height: 1.5;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-header {
    background: linear-gradient(135deg, var(--dark), #2A2A3A);
    padding: 1.2rem 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.app-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.3px;
}

#app-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    background: var(--light-bg);
}

.view {
    animation: fadeSlideIn 0.3s ease-out;
}
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.bottom-nav {
    background: rgba(30,30,46,0.96);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 calc(12px + var(--safe-bottom));
    border-top: 0.5px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.nav-item {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    padding: 8px 16px;
    border-radius: 40px;
    transition: all 0.2s;
    cursor: pointer;
}
.nav-item:active {
    background: rgba(255,255,255,0.1);
    color: var(--primary);
    transform: scale(0.96);
}

.welcome-card, .guidance-panel, .subscription-ui, .teaching-box, .quiz-box {
    background: var(--white);
    border-radius: var(--radius-card);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}
.welcome-card {
    background: var(--dark-card);
    color: white;
}
.welcome-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.welcome-card .gamification-stats-card {
    background: rgba(255,255,255,0.1);
    border-radius: 28px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}
.stat-item .label {
    font-size: 1rem;
}
.stat-item span:last-child {
    font-size: 2.2rem;
}
.access-timer-pill {
    font-size: 1.1rem;
    padding: 0.7rem 1.5rem;
}

.guidance-step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}
.step-number {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--dark);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.step-content {
    flex: 1;
}
.step-content label {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--dark);
}
.step-content select {
    width: 100%;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    border-radius: 60px;
    border: 1px solid #ddd;
    background: white;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
}
.hint {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    color: var(--gray);
}
#apply-settings-btn {
    font-size: 1.2rem;
    padding: 1rem;
    border-radius: 60px;
    width: 100%;
}

.btn-subject {
    font-size: 1rem;
    padding: 1rem 1.5rem;
    margin: 0.5rem;
    border-radius: 60px;
}
.btn-topic {
    font-size: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 0.8rem;
    border-radius: 28px;
}
.btn-secondary {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    border-radius: 40px;
}

.teaching-box {
    font-size: 1rem;
}
.lesson-content {
    font-size: 1rem;
    line-height: 1.6;
}
.trivia-card {
    font-size: 1rem;
    padding: 1rem;
}
.quiz-option {
    font-size: 1rem;
    padding: 1rem;
    margin: 0.8rem 0;
}

.input-group input {
    font-size: 1rem;
    padding: 1rem;
}
.btn-primary-sm {
    font-size: 1rem;
    padding: 0 1.8rem;
}
.btn-audio {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
}

.production-footer {
    font-size: 0.85rem;
}

.progress-bar-wrapper {
    height: 12px;
}
.progress-text {
    font-size: 1rem;
    font-weight: bold;
}
.loader-spinner {
    width: 24px;
    height: 24px;
}

.hidden { display: none; }
.settings-card {
    background: var(--white);
    border-radius: 28px;
    padding: 2rem;
    margin-bottom: 2rem;
}
.settings-group {
    margin-bottom: 2rem;
}
.settings-group h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}
.settings-group button {
    margin-right: 1rem;
    margin-bottom: 1rem;
}
.storage-info {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray);
}

/* Textbook View */
.textbook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}
.textbook-swiper {
    width: 100%;
    height: auto;
    min-height: 400px;
    border-radius: var(--radius-card);
    background: var(--white);
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.swiper-slide {
    background: var(--white);
    border-radius: 20px;
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 70vh;
}
.swiper-button-next, .swiper-button-prev {
    color: var(--primary);
}
.swiper-pagination-bullet-active {
    background: var(--primary);
}
.reference-links {
    margin-top: 1.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}
.reference-links details summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 500;
}
/* Floating Tutor Palette */
.tutor-palette {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 320px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.tutor-palette.hidden { display: none; }
.palette-header {
    background: var(--primary);
    color: var(--dark);
    padding: 12px 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.palette-header button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--dark);
}
.palette-messages {
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: #f9f9f9;
}
.tutor-message, .user-message {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 20px;
    max-width: 85%;
}
.tutor-message {
    background: var(--primary-light);
    color: var(--dark);
    align-self: flex-start;
}
.user-message {
    background: var(--primary);
    color: white;
    margin-left: auto;
    text-align: right;
}
.palette-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #eee;
    background: white;
}
.palette-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 40px;
}
.palette-input button {
    background: var(--primary);
    border: none;
    border-radius: 40px;
    padding: 0 16px;
    color: white;
    cursor: pointer;
}

/* Paystack modern button */
.paystack-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #0ba95a 0%, #0ca34e 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(11, 169, 90, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
    width: fit-content;
    margin: 20px auto;
}
.paystack-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(11, 169, 90, 0.5);
}
.paystack-btn .btn-icon {
    font-size: 1.4rem;
}
.status-msg {
    text-align: center;
    font-weight: 600;
    margin-top: 10px;
}
