
/* ==========================================================
   Students Homework AI
   Version 3.0
   style.css
   PART 1
   Global • Header • Hero • Registration
   ========================================================== */

/* -----------------------------
   ROOT VARIABLES
------------------------------ */

:root{

    --primary:#1565C0;
    --primary-dark:#0D47A1;
    --secondary:#22C55E;
    --secondary-dark:#16A34A;

    --background:#F5F8FC;
    --surface:#FFFFFF;

    --text:#1E293B;
    --text-light:#64748B;

    --border:#E2E8F0;

    --danger:#DC2626;

    --radius:16px;

    --shadow:
        0 8px 30px rgba(0,0,0,.08);

}

/* -----------------------------
   RESET
------------------------------ */

*{

    margin:0;

    padding:0;

    box-sizing:border-box;

}

html{

    scroll-behavior:smooth;

}

body{

    font-family:'Poppins',sans-serif;

    background:var(--background);

    color:var(--text);

    min-height:100vh;

    line-height:1.5;

}

/* -----------------------------
   GLOBAL
------------------------------ */

img{

    max-width:100%;

    display:block;

}

button{

    font-family:'Poppins',sans-serif;

    cursor:pointer;

    border:none;

    outline:none;

    transition:.25s;

}

input,
textarea{

    font-family:'Poppins',sans-serif;

    outline:none;

}

.hidden{

    display:none !important;

}

/* -----------------------------
   APP
------------------------------ */

#app{

    width:100%;

    max-width:480px;

    margin:auto;

    min-height:100vh;

    background:#fff;

    box-shadow:0 0 30px rgba(0,0,0,.06);

}

/* -----------------------------
   MESSAGE BAR
------------------------------ */

.app-message{

    position:fixed;

    top:75px;

    left:50%;

    transform:translateX(-50%);

    width:92%;

    max-width:420px;

    background:var(--primary);

    color:#fff;

    padding:12px 16px;

    border-radius:12px;

    text-align:center;

    font-weight:600;

    z-index:9999;

}

/* -----------------------------
   SCREEN
------------------------------ */

.screen{

    padding:18px;

    animation:fadeIn .3s ease;

}

/* -----------------------------
   HEADER
------------------------------ */

.top-header{

    position:sticky;

    top:0;

    background:#fff;

    z-index:100;

    padding:12px 0;

    border-bottom:1px solid var(--border);

}

.brand{

    display:flex;

    align-items:center;

    gap:12px;

}

.logo{

    width:52px;

    height:52px;

    object-fit:contain;

}

.brand-title{

    font-size:22px;

    font-weight:700;

    color:var(--primary);

}

.brand-subtitle{

    font-size:13px;

    color:var(--text-light);

}

/* -----------------------------
   HERO
------------------------------ */

.hero{

    text-align:center;

    padding:28px 10px;

}

.hero-logo{

    width:110px;

    margin:0 auto 18px;

}

.hero h2{

    font-size:30px;

    font-weight:700;

    color:var(--primary-dark);

    line-height:1.25;

}

.hero p{

    margin-top:14px;

    color:var(--text-light);

    font-size:16px;

}

/* -----------------------------
   CARD
------------------------------ */

.card{

    background:var(--surface);

    border-radius:var(--radius);

    box-shadow:var(--shadow);

    padding:22px;

    margin-top:22px;

}

.registration-card h3{

    text-align:center;

    color:var(--primary);

    font-size:24px;

    margin-bottom:20px;

}

/* -----------------------------
   INPUTS
------------------------------ */

.registration-card input{

    width:100%;

    height:52px;

    margin-bottom:14px;

    padding:0 16px;

    border:1px solid var(--border);

    border-radius:12px;

    font-size:16px;

    background:#fff;

}

.registration-card input:focus{

    border-color:var(--primary);

}

/* -----------------------------
   BUTTONS
------------------------------ */

.primary-btn{

    width:100%;

    height:54px;

    border-radius:12px;

    background:var(--secondary);

    color:#fff;

    font-size:18px;

    font-weight:700;

}

.primary-btn:hover{

    background:var(--secondary-dark);

}

.secondary-btn{

    width:100%;

    height:50px;

    border-radius:12px;

    background:var(--primary);

    color:#fff;

    font-size:17px;

    font-weight:600;

}

.secondary-btn:hover{

    background:var(--primary-dark);

}

/* -----------------------------
   LOGIN CARD
------------------------------ */

.login-card{

    margin-top:20px;

    text-align:center;

}

.login-card p{

    margin-bottom:12px;

    color:var(--text-light);

}

/* -----------------------------
   LANGUAGE
------------------------------ */

.language-card{

    margin-top:24px;

}

.language-card h3{

    text-align:center;

    margin-bottom:14px;

}

.language-buttons{

    display:flex;

    gap:12px;

}

.language-btn{

    flex:1;

    height:48px;

    border-radius:12px;

    border:1px solid var(--border);

    background:#fff;

    color:var(--text);

    font-size:16px;

    font-weight:600;

}

.language-btn.active{

    background:var(--primary);

    color:#fff;

    border-color:var(--primary);

}

/* -----------------------------
   ANIMATION
------------------------------ */

@keyframes fadeIn{

    from{

        opacity:0;

        transform:translateY(8px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ==========================================================
   END OF PART 1
   PART 2:
   Dashboard • Usage • Class Grid • Subject Grid
   ========================================================== */
/* ==========================================================
   Students Homework AI
   Version 3.0
   style.css
   PART 2
   Dashboard • Class • Subject • Homework • Question
   ========================================================== */

/* -----------------------------
   DASHBOARD
------------------------------ */

.dashboard-header{

    display:flex;

    justify-content:space-between;

    align-items:flex-start;

    gap:16px;

    margin-bottom:24px;

}

#welcomeMessage{

    font-size:26px;

    font-weight:700;

    color:var(--primary-dark);

}

.membership-badge{

    display:inline-block;

    margin-top:10px;

    padding:8px 14px;

    border-radius:999px;

    background:#E8F5E9;

    color:#2E7D32;

    font-size:14px;

    font-weight:600;

}

.logout-btn{

    padding:10px 18px;

    border-radius:12px;

    background:var(--danger);

    color:#fff;

    font-size:15px;

    font-weight:600;

}

.logout-btn:hover{

    opacity:.92;

}

/* -----------------------------
   USAGE CARD
------------------------------ */

.usage-card{

    background:#fff;

    border-radius:var(--radius);

    box-shadow:var(--shadow);

    padding:20px;

    margin-bottom:24px;

}

.usage-card h3{

    margin-bottom:10px;

    color:var(--primary);

}

#usageCounter{

    margin-bottom:14px;

    color:var(--text-light);

}

.progress{

    width:100%;

    height:10px;

    border-radius:999px;

    background:#E5E7EB;

    overflow:hidden;

}

.progress-fill{

    width:0;

    height:100%;

    background:linear-gradient(
        90deg,
        var(--secondary),
        var(--primary)
    );

    transition:width .4s ease;

}

/* -----------------------------
   CLASS SECTION
------------------------------ */

.class-section{

    margin-top:28px;

}

.class-section h2{

    text-align:center;

    margin-bottom:20px;

    color:var(--primary-dark);

}

/* -----------------------------
   CLASS GRID
------------------------------ */

.class-grid{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:16px;

}

.class-grid button{

    min-height:100px;

    border-radius:18px;

    background:#fff;

    border:2px solid var(--border);

    font-size:18px;

    font-weight:600;

    color:var(--text);

    box-shadow:var(--shadow);

    padding:18px 10px;

}

.class-grid button:hover{

    border-color:var(--primary);

    transform:translateY(-3px);

}

.class-grid button:active{

    transform:scale(.98);

}

/* Last button spans full width */

.class-grid button:last-child{

    grid-column:1 / -1;

}

/* -----------------------------
   BACK BUTTON
------------------------------ */

.back-btn{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    padding:10px 18px;

    margin-bottom:20px;

    border-radius:12px;

    background:var(--primary);

    color:#fff;

    font-size:15px;

    font-weight:600;

}

/* -----------------------------
   SUBJECT TITLE
------------------------------ */

#selectedClassTitle,
#selectedSubjectTitle,
#questionScreenTitle{

    text-align:center;

    font-size:28px;

    font-weight:700;

    color:var(--primary-dark);

    margin-bottom:24px;

}

/* -----------------------------
   SUBJECT GRID
------------------------------ */

.subject-grid{

    display:grid;

    grid-template-columns:1fr;

    gap:14px;

}

.subject-grid button{

    width:100%;

    min-height:64px;

    border-radius:16px;

    background:#fff;

    border:2px solid var(--border);

    box-shadow:var(--shadow);

    text-align:left;

    padding:18px;

    font-size:17px;

    font-weight:600;

    color:var(--text);

}

.subject-grid button:hover{

    border-color:var(--primary);

    transform:translateX(3px);

}

/* -----------------------------
   ACTION GRID
------------------------------ */

.action-grid{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:16px;

}

.action-grid button{

    min-height:110px;

    border-radius:18px;

    background:#fff;

    border:2px solid var(--border);

    box-shadow:var(--shadow);

    font-size:17px;

    font-weight:600;

    color:var(--text);

    padding:16px;

}

.action-grid button:hover{

    border-color:var(--primary);

    transform:translateY(-3px);

}

/* -----------------------------
   QUESTION CARD
------------------------------ */

.question-card{

    background:#fff;

    border-radius:var(--radius);

    box-shadow:var(--shadow);

    padding:20px;

}

.question-card textarea{

    width:100%;

    min-height:180px;

    resize:vertical;

    padding:16px;

    border:1px solid var(--border);

    border-radius:14px;

    font-size:16px;

    line-height:1.6;

}

.question-card textarea:focus{

    border-color:var(--primary);

}

/* -----------------------------
   QUESTION ACTIONS
------------------------------ */

.question-actions{

    display:flex;

    gap:14px;

    margin-top:18px;

}

.question-actions button{

    flex:1;

}

/* ==========================================================
   END OF PART 2

   PART 3:
   Loading • Answer • Footer • Responsive • Utilities
   ========================================================== */
/* ==========================================================
   Students Homework AI
   Version 3.0
   style.css
   PART 3
   Loading • Answer • Referral • Footer • Responsive
   ========================================================== */

/* -----------------------------
   LOADING SCREEN
------------------------------ */

.loading-card{

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    min-height:70vh;

    text-align:center;

    padding:24px;

}

.loader{

    width:70px;

    height:70px;

    border:6px solid #E5E7EB;

    border-top:6px solid var(--primary);

    border-radius:50%;

    animation:spin 1s linear infinite;

    margin-bottom:24px;

}

.loading-card h2{

    color:var(--primary-dark);

    font-size:28px;

    margin-bottom:12px;

}

.loading-card p{

    color:var(--text-light);

    font-size:16px;

}

@keyframes spin{

    from{

        transform:rotate(0deg);

    }

    to{

        transform:rotate(360deg);

    }

}

/* -----------------------------
   ANSWER SCREEN
------------------------------ */

.answer-card{

    background:#fff;

    border-radius:var(--radius);

    box-shadow:var(--shadow);

    padding:22px;

    margin-bottom:22px;

}

.answer-card h2{

    color:var(--primary-dark);

    margin-bottom:18px;

    text-align:center;

}

#answerContainer{

    font-size:16px;

    line-height:1.8;

    color:var(--text);

    word-break:break-word;

}

#answerContainer h1,
#answerContainer h2,
#answerContainer h3{

    color:var(--primary-dark);

    margin:18px 0 10px;

}

#answerContainer strong{

    color:var(--primary-dark);

}

#answerContainer ul,
#answerContainer ol{

    padding-left:24px;

    margin:14px 0;

}

#answerContainer li{

    margin-bottom:8px;

}

#answerContainer table{

    width:100%;

    border-collapse:collapse;

    margin:16px 0;

    overflow-x:auto;

    display:block;

}

#answerContainer th,
#answerContainer td{

    border:1px solid var(--border);

    padding:10px;

}

#answerContainer th{

    background:#F1F5F9;

}

/* -----------------------------
   ANSWER BUTTONS
------------------------------ */

.answer-buttons{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:12px;

}

.answer-buttons button{

    min-height:52px;

}

/* -----------------------------
   REFERRAL
------------------------------ */

#referralSection .card{

    text-align:center;

}

#referralSection h2{

    color:var(--primary);

    margin-bottom:14px;

}

#referralSection p{

    color:var(--text-light);

    margin-bottom:20px;

}

/* -----------------------------
   FOOTER
------------------------------ */

.app-footer{

    background:var(--primary-dark);

    color:#fff;

    text-align:center;

    padding:30px 20px;

    margin-top:40px;

}

.app-footer strong{

    font-size:20px;

}

.app-footer p{

    margin:8px 0;

    opacity:.96;

}

.footer-links{

    display:flex;

    justify-content:center;

    flex-wrap:wrap;

    gap:12px;

    margin:20px 0;

}

.footer-links button{

    background:rgba(255,255,255,.12);

    color:#fff;

    border:1px solid rgba(255,255,255,.25);

    border-radius:10px;

    padding:10px 16px;

    font-size:14px;

}

.footer-links button:hover{

    background:rgba(255,255,255,.20);

}

/* -----------------------------
   MOBILE RESPONSIVE
------------------------------ */

@media (max-width:480px){

    .brand-title{

        font-size:18px;

    }

    .hero h2{

        font-size:24px;

    }

    .hero-logo{

        width:90px;

    }

    .registration-card h3{

        font-size:20px;

    }

    .dashboard-header{

        flex-direction:column;

        align-items:flex-start;

    }

    .logout-btn{

        width:100%;

    }

    .class-grid{

        grid-template-columns:1fr 1fr;

    }

    .action-grid{

        grid-template-columns:1fr 1fr;

    }

    .answer-buttons{

        grid-template-columns:1fr;

    }

    .question-actions{

        flex-direction:column;

    }

    .language-buttons{

        flex-direction:column;

    }

}

/* -----------------------------
   TABLET
------------------------------ */

@media (min-width:768px){

    #app{

        max-width:700px;

    }

    .hero h2{

        font-size:36px;

    }

    .class-grid{

        grid-template-columns:repeat(3,1fr);

    }

    .class-grid button:last-child{

        grid-column:auto;

    }

    .subject-grid{

        grid-template-columns:repeat(2,1fr);

    }

    .action-grid{

        grid-template-columns:repeat(2,1fr);

    }

}

/* -----------------------------
   UTILITIES
------------------------------ */

.text-center{

    text-align:center;

}

.mt-10{

    margin-top:10px;

}

.mt-20{

    margin-top:20px;

}

.mb-20{

    margin-bottom:20px;

}

.w-100{

    width:100%;

}

.shadow{

    box-shadow:var(--shadow);

}

.rounded{

    border-radius:var(--radius);

}

/* -----------------------------
   SCROLLBAR
------------------------------ */

::-webkit-scrollbar{

    width:8px;

}

::-webkit-scrollbar-track{

    background:#EDF2F7;

}

::-webkit-scrollbar-thumb{

    background:var(--primary);

    border-radius:10px;

}

::-webkit-scrollbar-thumb:hover{

    background:var(--primary-dark);

}

/* ==========================================================
   END OF STYLE.CSS
   Students Homework AI
   Version 3.0
   Production Ready
   ========================================================== */
