﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

/*body {
  margin-bottom: 60px;
}*/

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}


body {
    margin: 0;
    /*    background: linear-gradient(135deg,#eef2ff,#f8fafc);*/
    background: white;
    font-family: 'Segoe UI';
}

/* HEADER */
.exam-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(135deg,#0b2c5a,#1e3a8a);
    color: white;
}

.header-center {
    width: 40%;
}

.progress-bar-top {
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    margin-top: 10px;
}

.progress-fill {
    height: 100%;
    background: #22c55e;
    width: 0%;
    transition: 0.3s;
}

.finish-btn {
    margin-left: 10px;
    border: none;
    padding: 6px 12px;
    font-size: 16px;
    font-weight: 600;
}

/* TOP */
.top-actions {
    display: flex;
    justify-content: space-between;
    padding: 8px 20px;
}

.palette-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
}

.save-status {
    font-size: 12px;
    color: green;
    opacity: 0;
    transition: .3s;
}

/* NAV */
.q-nav-bar {
    display: flex;
    align-items: center;
    width: 650px;
    margin: auto;
    max-width:100%;
    margin-top:17px;
}

.q-nav-slider {
    display: flex;
    overflow-x: hidden;
    gap: 8px;
    flex: 1;
}

.q-btn {
    min-width: 34px;
    height: 34px;
    border-radius: 20px;
    border: none;
    background: #e5e7eb;
}

    .q-btn.current {
        background: #2563eb;
        color: white;
    }

    .q-btn.visited {
        background: #ef4444;
        color: white;
    }

    .q-btn.answered {
        background: #22c55e;
        color: white;
    }

.nav-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #2563eb;
    color: white;
    margin-left: 12px;
    margin-right: 12px;
}

/* BODY */
.exam-body { 
    padding: 15px;
    gap: 20px;
  
    max-height:100%;
   margin-top: 30px;
}

.question-panel {
    flex: 1;
    border: 1px solid grey;
    padding: 20px;
    border-radius: 10px;
}

.options-panel {
    width: 40%;
}

.option {
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    cursor: pointer;
}

    .option.active {
        background: #2563eb;
        color: white;
    }

/* ACTION */
.actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

.nav-btn-group {
    display: flex;
    gap:12px;
}

.btn-prev, .btn-next {
    padding: 10px 15px;
    border: none;
}

.btn-next {
    background: #2563eb;
    color: white;
}

.btn-clear {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fee2e2;
    border: none;
}

/* PALETTE */
.palette-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.question{
    font-size:18px;
}

.timers{
    display:flex;
    align-items:center;
}

.palette-box {
    background: white;
    padding: 15px;
    border-radius: 10px;
    height: 450px;
    overflow: scroll;
    width: 645px;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: 20px;
    margin-top:20px;
}

.palette-toggle-btn {
    background: linear-gradient(135deg,#2563eb,#4f46e5) !important;
    color: white;
    /* MAIN SHADOW (depth) */
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3),
    /* TOP LIGHT */
    inset 1px 1px 2px rgba(255,255,255,0.4),
    /* LEFT LIGHT */
    inset 2px 2px 4px rgba(255,255,255,0.25),
    /* BOTTOM DARK EDGE */
    inset -2px -2px 4px rgba(0,0,0,0.2);
    border: none;
}

.q-btn {
    min-width: 34px;
    height: 34px;
    border-radius: 20px;
    border: none;
    background: #e5e7eb;
    cursor: pointer;
}

    /* SAME COLORS */
    .q-btn.answered {
        background: #22c55e; /* green */
        color: white;
    }

    .q-btn.visited {
        background: #ef4444; /* red */
        color: white;
    }

    .q-btn.current {
        background: #2563eb; /* blue */
        color: white;
    }


.palette-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    /* IMPORTANT */
    display: none;
    justify-content: center;
    align-items: center;
}

/* ===== CARD ===== */
.result-card {
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff, #f1f5ff);
    padding: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: 0.35s ease;
    border: 1px solid #e6ebf5;
    height: 355px;
    max-height: 100%;
}

/* subtle glow effect */
.result-card::before {
    content: '';
    position: absolute;
    /* width: 140%; */
    height: 140%;
    top: -40%;
    left: -40%;
    background: radial-gradient(circle, rgba(79,172,254,0.15), transparent 60%);
    transition: 0.5s;
}

.result-card:hover::before {
    transform: rotate(25deg);
}

.result-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* ===== BADGE ===== */
.exam-badge {
    display: inline-block;
    background: linear-gradient(90deg, #4facfe, #030404);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
}

/* ===== SUBJECT ===== */
.subject-text {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
}

/* ===== SCORE CIRCLE ===== */
.score-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: conic-gradient(#22c55e calc(var(--score)*1%), #e5e7eb 0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px auto;
}

.score-inner {
    width: 70px;
    height: 70px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #2c3e50;
}

/* ===== TEXT ===== */
.total-text {
    font-size: 14px;
    color: #6b7280;
}

.score-text {
    font-weight: 600;
    color: #22c55e;
}

/* ===== BUTTON ===== */
.view-btn {
    margin-top: 12px;
    border-radius: 30px;
    padding: 8px 20px;
    background: linear-gradient(90deg, #ff7a18, #ffb347);
    border: none;
    color: #fff;
    font-weight: 500;
    transition: 0.3s;
}

    .view-btn:hover {
        opacity: 0.85;
    }

/* ===== TITLE ===== */
.page-title {
    font-weight: 600;
    margin-bottom: 25px;
    color: #2c3e50;
}

@media (max-width:768px) {
    .exam-body {
        margin-top: 0px
    }

    .nav-arrow {
        margin-left: 7px;
        margin-right: 7px;
    }

    .palette-box{
        width:478px;
    }
}

@media (max-width:600px){   
    .exam-header{
        justify-content:center;
        gap:12px;
        flex-direction:column;
    }

    .header-center{
        width:100%;
    }

    .q-nav-bar{
    margin-top:4px;
    }

    .timers{
        justify-content:space-between;
    }

    .palette-box {
        width: 278px;
    }
}