:root {
  --primary: #dc3f3f;
  --primary-dark: #b92e2e;
  --glass: rgba(255, 255, 255, 0.85);
}

body {
  font-family: "Segoe UI", sans-serif;
  background-color: var(--bg-light);
}

.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, #ff6a6a, #ffb199);
  animation: gradientMove 6s ease infinite;
}


.hero-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  max-width: 520px;
  margin: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  animation: floatIn 0.8s ease;
}

.hero-card h1 {
  font-size: 34px;
  font-weight: 800;
}
.btn-primary {
  background: linear-gradient(135deg, #dc3f3f, #ff6a6a);
  border: none;
  border-radius: 30px;
  font-weight: 600;
  transition: 0.3s;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(220,63,63,0.6);
}
.modal-content {
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
/* Animations */
@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
.instruction-card {
  border-radius: 15px;
}

.list-group-item {
  border: none;
  padding: 10px 0;
}

.btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}
.top-bar {
  background: #fff;
  border-radius: 10px;
}

.question-card, .palette-card {
  border-radius: 12px;
}

.palette-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: #e0e0e0;
}

.palette-btn.answered {
  background-color: #28a745;
  color: #fff;
}

.palette-btn.review {
  background-color: purple;
  color: #fff;
}
.result-card {
  border-radius: 15px;
}

.score-box {
  transition: 0.3s ease;
}

.score-box:hover {
  transform: translateY(-5px);
}
.card {
    border: none;
}

.card h5 {
    color: #0d6efd;
}

.bg-purple {
    background-color: purple;
}
/* Desktop default */
.btn-icon {
  display: none;
}

/* Mobile only */
@media (max-width: 768px) {
  .btn-text {
    display: none !important;
  }

  .btn-icon {
    display: inline-block !important;
    font-size: 22px;
  }

  .nav-btn {
    width: 46px;
    height: 46px;
    padding: 0;
  }
}
:root {
  --primary-blue: #1e2a78;
  --success-green: #28a745;
  --bg-body: #f0f2f5;
  --border-color: #dee2e6;
}

body {
  background-color: var(--bg-body);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Like Gurumantra */
.exam-header {
  background-color: var(--primary-blue);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.timer-box {
  font-size: 1.1rem;
  font-weight: 600;
  background: rgba(255,255,255,0.1);
  padding: 4px 12px;
  border-radius: 4px;
}

/* Palette Styling */
.palette-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: #fff;
  transition: 0.2s;
}

.palette-btn.answered { background: var(--success-green); color: white; border-color: var(--success-green); }
.palette-btn.review { background: #6f42c1; color: white; border-color: #6f42c1; }
.palette-btn.active { border: 2px solid var(--primary-blue); font-weight: bold; }

.legend-box {
  width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 1px solid #ccc; display: inline-block;
}
.legend-box.answered { background: var(--success-green); }
.legend-box.review { background: #6f42c1; }

/* Desktop: Hide Icons if you only want text, or keep both. 
   Currently both are visible on desktop. */
.nav-btn i { font-size: 14px; }

/* ===========================================
   RESPONSIVE LOGIC (Mobile Only)
   =========================================== */
@media (max-width: 768px) {
  /* Hide Text, Show Only Icons */
  .btn-text {
    display: none !important;
  }
  
  .nav-btn {
    width: 45px;
    height: 45px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important; /* Circular buttons on mobile */
  }

  .nav-btn i {
    font-size: 18px;
    margin: 0;
  }

  .exam-header h6 {
    font-size: 14px;
  }

  .card-header {
    font-size: 13px;
  }
}

/* Color Variables */
:root {
    --primary-blue: #2c3e8c;
    --btn-purple: #6f42c1;
    --btn-dark-purple: #5227a1;
    --not-visited: #e0e0e0;
    --answered: #28a745;
    --not-answered: #dc3545;
}

/* Layout Tweaks */
.exam-header { background-color: var(--primary-blue); height: 50px; }
.main-question-card .card-header { background-color: #e9ecef; color: #1e2a78; border-bottom: 2px solid #cbd5e0; }
.marks-badge { background: #fff; padding: 2px 10px; border-radius: 4px; font-size: 0.85rem; box-shadow: inset 0 0 2px rgba(0,0,0,0.1); }

/* Palette Grid */
.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.q-circle {
    width: 35px; height: 35px; border-radius: 50%;
    background: var(--not-visited); display: flex;
    align-items: center; justify-content: center;
    font-size: 0.85rem; cursor: pointer; border: 1px solid #ccc;
}
.q-circle.answered { background: var(--answered); color: white; border: none; }
.q-circle.not-answered { background: var(--not-answered); color: white; border: none; }

/* Legend Styles */
.legend-box {
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 10px; font-weight: bold;
}
.legend-box.gray { background: #e0e0e0; color: #666; }
.legend-box.green { background: var(--answered); }
.legend-box.red { background: var(--not-answered); }
.legend-box.purple { background: var(--btn-purple); }
.legend-box.purple-dot { background: var(--btn-purple); position: relative; }
.legend-box.purple-dot::after { 
    content: ''; position: absolute; bottom: 2px; right: 2px; 
    width: 6px; height: 6px; background: #00ff00; border-radius: 50%; 
}
.tiny-text { font-size: 11px; color: #444; }

/* Custom Buttons */
.btn-purple { background: var(--btn-purple); color: white; }
.btn-dark-purple { background: var(--btn-dark-purple); color: white; }
.btn-primary-outline { border: 1px solid var(--primary-blue); color: var(--primary-blue); }

/* RESPONSIVE: Mobile Icon Only View */
@media (max-width: 768px) {
    .btn-text { display: none !important; }
    .nav-btn {
        width: 42px; height: 42px; padding: 0;
        display: inline-flex; align-items: center; justify-content: center;
        border-radius: 50% !important;
    }
    .nav-btn i { font-size: 18px; margin: 0; }
    .palette-grid { grid-template-columns: repeat(6, 1fr); }
}

/* Palette Colors based on Image Legend */

/* Gray: Not Visited */
.q-circle.not-visited { background-color: #e0e0e0; color: #666; }

/* Red: Visited but Not Answered */
.q-circle.not-answered { background-color: #dc3545; color: white; border: none; }

/* Green: Answered */
.q-circle.answered { background-color: #28a745; color: white; border: none; }

/* Purple: Mark for Review (No Answer) */
.q-circle.review { background-color: #6f42c1; color: white; border: none; }

/* Green & Purple: Save & Mark for Review */
.q-circle.save-mark-review {
    background-color: #6f42c1; /* Purple Base */
    color: white;
    position: relative;
}
/* Adding the Green Dot for 'Answered + Marked' logic */
.q-circle.save-mark-review::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background-color: #28a745; /* Green Dot */
    border-radius: 50%;
    border: 1px solid white;
}

.q-circle.active { border: 2px solid #2c3e8c !important; font-weight: bold; }

/* Mobile View Fix */
@media (max-width: 768px) {
    /* Button ke andar ka text hide karne ke liye */
    .btn span {
        display: none !important;
    }

    /* Buttons ko icon ke hisaab se chota aur adjust karne ke liye */
    .btn {
        padding: 8px 12px !important;
        min-width: 40px;
        margin: 2px !important;
    }

    /* Icons ka margin hatane ke liye */
    .btn i {
        margin: 0 !important;
    }
}

/* ===========================================
   BUTTON HOVER FIX (Anti-White Wash)
   =========================================== */

/* 1. Previous Button - Blue Outline to Light Gray */
#prevBtn:hover, .btn-primary-outline:hover {
    background-color: #f0f2f5 !important;
    color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
}

/* 2. Save & Next - Red to Dark Red */
#nextBtn:hover, .btn-danger:hover {
    background-color: #b92e2e !important; /* Darker Red */
    color: white !important;
    border-color: #b92e2e !important;
}

/* 3. Mark for Review - Purple to Dark Purple */
#markReviewBtn:hover, .btn-purple:hover {
    background-color: #5a32a3 !important; /* Darker Purple */
    color: white !important;
    border-color: #5a32a3 !important;
}

/* 4. Save & Mark for Review - Darkest Purple */
#saveMarkReviewBtn:hover, .btn-dark-purple:hover {
    background-color: #3d1d7a !important; /* Deep Dark Purple */
    color: white !important;
    border-color: #3d1d7a !important;
}

/* 5. Clear/Erase Button - Outline to Light Red */
#eraseBtn:hover {
    background-color: #f67a1c !important;
    color: #000000 !important;
    border-color: #dc3545 !important;
}

/* Common transition for smooth hover */
.btn {
    transition: all 0.3s ease !important;
}
/* ===========================================
   PREVIOUS & NEXT BUTTONS (Blue Theme) 
   =========================================== */

#prevBtn, #nextBtn {
    background-color: var(--primary-blue) !important; /* Dono hamesha blue rahenge */
    color: white !important;
    border: 2px solid var(--primary-blue) !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Hover effect: Jab mouse le jayenge toh white nahi hoga, dark blue hoga */
#prevBtn:hover, #nextBtn:hover {
    background-color: #1a255d !important; /* Darker blue shade */
    color: white !important;
    border-color: #1a255d !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 62, 140, 0.3);
}

/* Disabled state (agar button kaam na kar rha ho) */
#prevBtn:disabled, #nextBtn:disabled {
    background-color: #ccc !important;
    border-color: #ccc !important;
    cursor: not-allowed;
    transform: none;
}