* {
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
  }
  
  body {
    background: #f1f5f9;
    margin: 0;
  }
 
  .container {
    max-width: 750px;
    margin: 30px auto;
    padding: 20px;
  }
  
  header {
    text-align: center;
    margin-bottom: 30px;
  }
  
  header p {
    color: #64748b;
  }
 
  .header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
  }
 
.dark .header h1 {
    text-shadow:
      0 0 8px rgba(56, 189, 248, 0.45),
      0 0 18px rgba(56, 189, 248, 0.25);
  }
  @keyframes titleGlow {
    0%, 100% {
      text-shadow:
        0 0 8px rgba(56, 189, 248, 0.4),
        0 0 18px rgba(56, 189, 248, 0.25);
    }
    50% {
      text-shadow:
        0 0 12px rgba(56, 189, 248, 0.6),
        0 0 28px rgba(56, 189, 248, 0.35);
    }
  }
  
  .dark .header h1 {
    animation: titleGlow 3s ease-in-out infinite;
  }
  
  
  .container {
    background: transparent;
  }
  .btn:active {
    transform: scale(0.98);
  }
  
  .section {
    margin-bottom: 20px;
  }
  
  .step {
    font-size: 13px;
    color: #475569;
    font-weight: 600;
    margin-bottom: 8px;
  }
  
  .mode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  .mode-card {
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 
      transform 0.25s ease,
      box-shadow 0.25s ease,
      background 0.25s ease;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  }
  
  .mode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(0,0,0,0.12);
  } 
  
  
  .mode-card.active {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    box-shadow: 0 18px 45px rgba(37,99,235,0.45);
  }
  
  
  .card {
    background: white;
    padding: 18px;
    margin-bottom: 16px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: fadeUp 0.45s ease;
    backdrop-filter: blur(6px);
  }
  
  
  label {
    font-weight: 500;
    display: block;
    margin-bottom: 6px;
  }
  
  input, select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
  }
  
  .subject {
    background: #f8fafc;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid #2563eb;
  }
  
  .subject-title {
    font-weight: 600;
    margin-bottom: 8px;
  }
  
  .tip {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
  }
  
  .btn {
    width: 100%;
    padding: 14px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
  }
  
  .btn:hover {
    background: #1e40af;
  }
  
  .result {
    margin-top: 25px;
    background: linear-gradient(135deg, #e0f2fe, #ecfeff);
    padding: 20px;
    border-radius: 14px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
  }
  
  .result span {
    display: block;
    font-size: 36px;
    margin-top: 10px;
  }
  
  .hidden {
    display: none;
  }
  .tip {
    font-size: 12px;
    color: #475569;
    margin-top: 6px;
  }

  .learn-more {
    margin-left: 8px;
    font-size: 13px;
    color: #2563eb;
    cursor: pointer;
    font-weight: 500;
  }
  
  .learn-more:hover {
    text-decoration: underline;
  }
  
  .dark .learn-more {
    color: #38bdf8;
  }
  .dark .learn-more:hover {
    text-decoration: underline;
  }
    
  .about h3 {
    margin-top: 0;
  }
  
  .about p {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
  }
  
  .dark .about p {
    color: #cbd5f5;
  }

  .back-btn {
    background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    text-decoration: none;
  }
  .back-btn:hover {
    background: linear-gradient(135deg, #475569, #334155);
  }
  .dark .back-btn {
    background: linear-gradient(135deg, #122239, #1c2e4b);
    color: #e5e7eb;
  }
  
  .dark .back-btn:hover {
    background: linear-gradient(135deg, #3d5986, #2e3552);
  }
    
  
  .back-wrap {
    margin-top: 28px;
    display: flex;
    justify-content: flex-end;
  }

  .about-page h3 {
    margin-top: 20px;
    margin-bottom: 8px;
  }
  
  .about-page p {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
  }
  
  .about-page ul {
    padding-left: 18px;
    margin-top: 6px;
  }
  
  .about-page li {
    margin-bottom: 6px;
    font-size: 14.5px;
  }
  
  .dark .about-page p,
  .dark .about-page li {
    color: #cbd5f5;
  }

  /* ===== DESIGNER CREDIT ===== */

.designer-credit {
    margin-top: 26px;
    text-align: right;
    font-size: 13px;
    color: #64748b;
    font-style: italic;
  }
  
  .designer-credit span {
    font-weight: 600;
    color: #4572d1;
  }
  
  .dark .designer-credit {
    color: #94a3b8;
  }
  
  .dark .designer-credit span {
    color: #2563eb;
  }

  /* ===== APP META INFO ===== */

.app-meta {
    margin-top: 10px;
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
  }
  
  .app-meta span {
    white-space: nowrap;
  }
  
  .dark .app-meta {
    color: #64748b;
  }

  /* ===== GITHUB ICON ===== */

.github-link {
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
  }
  
  .github-link svg {
    width: 18px;
    height: 18px;
    fill: #64748b;
    transition: transform 0.2s ease, fill 0.2s ease;
  }
  
  .github-link:hover svg {
    transform: scale(1.1);
    fill: #2563eb;
  }

  
  
/* ================================
   DARK MODE
================================ */

body {
    background: #f8fafc;
    color: #0f172a;
    transition: background 0.3s, color 0.3s;
  }
  
  .dark {
    background: #0f172a;
    color: #e5e7eb;
  }
  
  .dark .card {
    background: #020617;
    border-color: #1e293b;
  }
  
  .dark input,
  .dark select {
    background: #020617;
    color: #e5e7eb;
    border: 1px solid #334155;
  }
  
  .dark input::placeholder {
    color: #94a3b8;
  }
  
  .dark .mode-card {
    background: #020617;
    color: #cbd5f5;
  }
  
  .dark .mode-card.active {
    border-color: #38bdf8;
  }
  
  .dark .btn {
    background: #38bdf8;
    color: #020617;
  }
  
  .dark .tip {
    color: #94a3b8;
  }
  
  .theme-btn {
    background: transparent;
    border: 1px solid #cbd5f5;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
  }
  
  .dark .theme-btn {
    border-color: #475569;
    color: #e5e7eb;
  }
  .header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .dark .about-page {
    background: #020617;
    border-color: #1e293b;
  }
  
  .dark .about-page h3 {
    color: #e5e7eb;
  }
  
  .dark .about-page p,
  .dark .about-page li {
    color: #cbd5f5;
  }
  
   /* ================================
   DARK MODE FIX: SUBJECT TITLES
================================ */

.dark .subject-title {
    color: #e5e7eb;     
    font-weight: 600;
  }

  .dark .subject {
    background: #020617;
    border: 1px solid #1e293b;
  }
  /* ===== PREMIUM CARD DEPTH ===== */
  
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 28px 60px rgba(0,0,0,0.12);
  }
  
  .dark .card {
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  }
  /* ===== SUBJECT CARD POLISH ===== */

.subject {
    border-radius: 14px;
    transition: box-shadow 0.2s ease;
  }
  
   .subject:hover {
    box-shadow: 0 0 0 2px rgba(56,189,248,0.4);
  }
  
  .dark .subject:hover {
    box-shadow: 0 0 0 2px rgba(56,189,248,0.6);
  } 

  /* ===== INPUT FOCUS GLOW ===== */

input:focus,
select:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56,189,248,0.25);
}

.dark input:focus,
.dark select:focus {
  box-shadow: 0 0 0 3px rgba(56,189,248,0.4);
}

/* ===== RESULT CARD ===== */

#result {
    border-radius: 18px;
    padding: 24px;
    font-size: 18px;
    background: linear-gradient(135deg, #e0f2fe, #f0fdfa);
  }
  
  .dark #result {
    background: linear-gradient(135deg, #020617, #020617);
    border: 1px solid #1e293b;
  }

  /* ===== DARK MODE BACKDROP ===== */

.dark {
    background: radial-gradient(
      circle at top,
      #020617,
      #020617 60%,
      #000 100%
    );
  } 

  .grade-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }
  
  .grade-table th,
  .grade-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .grade-table th {
    background: #2563eb;
    color: white;
  }
  
  .dark .grade-table th {
    background: #020617;
  }
  
  .dark .grade-table td {
    border-color: #1e293b;
  }

  /* ===== GRADE HIGHLIGHTS ===== */

.grade-ex {
    background: rgba(34, 197, 94, 0.15);
  }
  
  .grade-f {
    background: rgba(239, 68, 68, 0.15);
  }
  
  /* ⭐ Highest Credit EX */
  /* .grade-ex-top {
    font-weight: 700;
    border-left: 5px solid #22c55e;
  } */
  
  /* ===== STATUS BANNERS ===== */
  
  .warning-card {
    background: rgba(239, 68, 68, 0.12);
    border-left: 5px solid #ef4444;
  }
  
  .success-card {
    background: rgba(34, 197, 94, 0.12);
    border-left: 5px solid #22c55e;
  }
  
  /* Dark mode */
  .dark .grade-ex {
    background: rgba(34, 197, 94, 0.25);
  }
  
  .dark .grade-f {
    background: rgba(239, 68, 68, 0.25);
  }
  
  .dark .warning-card {
    background: rgba(239, 68, 68, 0.25);
  }
  
  .dark .success-card {
    background: rgba(34, 197, 94, 0.25);
  }
  
  .header {
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  
  .dark .header {
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  #resetBtn {
    background: linear-gradient(135deg, #64748b, #475569);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  }
  
  #resetBtn:hover {
    background: linear-gradient(135deg, #475569, #334155);
  }
  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .tagline {
    margin-top: 6px;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.2px;
  }

  .dark .tagline {
    color: #94a3b8;
  }
  
  /* ================================
   📱 MOBILE SPACING POLISH
   ================================ */

@media (max-width: 640px) {

    /* Page padding */
    .container {
      padding: 14px;
      margin: 16px auto;
    }
  
    /* Header */
    .header h1 {
      font-size: 22px;
    }
  
    .header p {
      font-size: 13px;
    }
  
    /* Mode cards stack */
    .mode-grid {
      grid-template-columns: 1fr;
      gap: 10px;
    }
  
    .mode-card {
      padding: 14px;
      font-size: 15px;
    }
  
    /* Cards */
    .card {
      padding: 14px;
      margin-bottom: 14px;
    }
  
    /* Subject blocks */
    .subject {
      padding: 12px;
    }
  
    .subject-title {
      font-size: 14px;
    }
  
    /* Inputs & selects */
    input,
    select {
      padding: 12px;
      font-size: 15px;
    }
  
    /* Buttons – thumb friendly */
    .btn {
      padding: 13px;
      font-size: 15px;
    }
  
    #resetBtn {
      margin-top: 8px;
    }
  
    /* Result */
    #result {
      padding: 18px;
      font-size: 16px;
    }
  
    #result span {
      font-size: 30px;
    }
  
    /* Grade table */
    .grade-table {
      font-size: 13px;
    }
  
    .grade-table th,
    .grade-table td {
      padding: 8px;
    }
  }
  
  
  
  
  
  
  
  
  
       
  