/* ==========================
   CBT MODERN - BRIGHT & CLEAN THEME
========================== */

:root{
    --primary: #2563eb;
    --secondary: #4f46e5;
    --success: #059669;
    --danger: #dc2626;
    --warning: #d97706;

    --bg-light: #f8fafc; /* Light Slate Gray */
    --surface: #ffffff;   /* Pure White */
    --surface-light: #f1f5f9;
    --border: #e2e8f0;    /* Light Gray Border */

    --text: #1e293b;      /* Dark Slate for readability */
    --text-soft: #64748b; /* Muted Gray */
    --accent: #3b82f6;
}

/* ==========================
   RESET
========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html,
body{
    width:100%;
    height:100%;
}

/* ==========================
   BACKGROUND
========================== */

body{

    background-color: var(--bg-light);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.05) 0px, transparent 50%);
    
    color:var(--text);
    overflow:hidden;
}

/* ==========================
   GENERAL
========================== */

.hidden{
    display:none !important;
}

.page{
    width:100%;
    height:100vh;
}

/* ==========================
   LOGIN PAGE
========================== */

#loginPage{
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
}

.login-card{

    width:500px;
    max-width:95%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius:28px;
    padding:40px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.login-card h1{
    text-align:center;
    font-size:40px;
    font-weight:800;
    margin-bottom:30px;
    background: linear-gradient(to right, #2563eb, #7c3aed);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    letter-spacing: -1px;
}

.login-card input,
.login-card select{

    width:100%;
    height:55px;
    margin-bottom:15px;
    border: 1px solid var(--border);
    border-radius:15px;
    padding:0 18px;
    background: #ffffff;
    color: var(--text);
    font-size:15px;
    outline:none;
    transition: all 0.2s ease;
}

.login-card input::placeholder{
    color: var(--text-soft);
}

.login-card input:focus,
.login-card select:focus{
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.login-card select option{
    color: var(--text);
}

.login-card button{

    width:100%;
    height:60px;
    border:none;
    border-radius:16px;
    cursor:pointer;
    color:white;
    font-size:18px;
    font-weight:700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.login-card button:hover{
    transform:translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

/* ==========================
   TOPBAR
========================== */

.topbar{

    height:70px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:0 25px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

#toggleNavBtn{
    display: none;
    background: var(--surface-light);
    border: 1px solid var(--border);
    color: white;
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

#examTitle{
    font-size:32px;
    font-weight:700;
}

#timer{
    font-size:30px;
    font-weight:800;
    color: var(--primary);
    letter-spacing:2px;
}

/* ==========================
   MAIN LAYOUT
========================== */

.container{
    display:flex;
    height:calc(100vh - 70px);
}
/* ========================== SIDEBAR ========================== */

.sidebar{

    width:250px;
    padding:15px;
    overflow-y:auto;
    background: #ffffff;
    border-right: 1px solid var(--border);
}

.sidebar-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header button {
    background: none;
    border: none;
    color: var(--text-soft);
    font-size: 20px;
    cursor: pointer;
}

#questionNav{
    display:grid;
    grid-template-columns:
    repeat(4,1fr);

    gap:10px;
}

.nav-btn{
    height:50px;
    border:none;
    border-radius:14px;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text);
    cursor:pointer;
    font-weight:700;
    transition: all 0.2s ease;
}

.nav-btn:hover{
    transform:translateY(-2px);
}

.nav-btn.active{
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    transform:scale(1.05);
}

.nav-btn.answered{
    background: #d1fae5;
    color: var(--success);
    border-color: var(--success);
}
/* ========================== CONTENT ========================== */

.main{
    flex:1;
    margin:20px;
    padding:40px;
    overflow-y:auto;
    border-radius:24px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* ==========================
   PROGRESS
========================== */

.progress-wrap{
    width:100%;
    height:10px;
    background: var(--surface-light);
    border-radius:50px;
    overflow:hidden;
    margin-bottom:20px;
}

#progressBar{
    width:0;
    height:100%;
    background: linear-gradient(90deg, var(--success), var(--primary));
    transition:.3s;
}

#progress{
    margin-bottom:15px;
    color: var(--text-soft);
    font-weight: 600;
}

/* ==========================
   QUESTION
========================== */

#questionNumber{

    margin-bottom:15px;
}

#questionNumber h2{
    font-size:28px;
    color: var(--accent);
    margin-bottom: 20px;
}

#questionText{
    font-size:21px;
    line-height:1.8;
    margin-bottom:35px;
    font-weight: 400;
}
/* ========================== OPTIONS ========================== */

.option{
    padding:18px;
    margin-bottom:12px;
    border-radius:18px;
    cursor:pointer;
    background: #ffffff;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.option:hover{
    transform:translateX(6px);
    background: var(--surface-light);
    border-color: var(--accent);
}

.option.selected{
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.option strong {
    color: var(--accent);
    margin-right: 10px;
}

.option.selected strong {
    color: white;
}

/* ==========================
   BUTTONS
========================== */

.navigation{
    display:flex;
    gap:15px;
    margin-top:40px;
}

.navigation button{
    border:none;
    padding:14px 25px;
    border-radius:14px;
    cursor:pointer;
    font-weight:700;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.navigation button:hover{
    background: var(--surface-light);
}

.finish-btn{
    margin-top:25px;
    border:none;
    padding:15px 30px;
    border-radius:14px;
    cursor:pointer;
    font-size:16px;
    font-weight:700;
    color:white;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    transition: all 0.2s ease;
}

.finish-btn:hover{
    transform:scale(1.02);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

/* ==========================
   SCROLLBAR
========================== */

::-webkit-scrollbar{
    width:10px;
}

::-webkit-scrollbar-track{
    background:transparent;
}

::-webkit-scrollbar-thumb{
    background: rgba(0, 0, 0, 0.1);
    border-radius:20px;
}
/* ========================== MOBILE ========================== */

@media(max-width:900px){

    body {
        overflow-y: auto;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 100;
    }

    #toggleNavBtn {
        display: block;
    }

    .page {
        height: auto;
        min-height: 100vh;
    }

    .container {
        display: block;
        height: auto;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%; /* Sembunyi di kiri */
        width: 280px;
        height: 100vh;
        z-index: 1000;
        background: var(--surface);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
        padding: 25px;
    }

    .sidebar.active {
        left: 0; /* Muncul */
    }

    .sidebar-header {
        display: flex;
    }

    #questionNav {
        grid-template-columns: repeat(5, 1fr);
    }

    .main {
        margin: 15px;
        width: calc(100% - 30px);
        padding: 25px;
        overflow-y: visible;
    }

    #questionText{
        font-size:17px;
    }

    .topbar{
        padding:0 15px;
    }

    #timer{
        font-size:20px;
    }
}