<style>
/* =========================================
   2 RESULT PAGE CSS (Forms, Tables, Score Cards, Merit)
   ========================================= */

/* --- UPLOAD AREA & HEADERS --- */
 .upload-area {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  margin: 10px;
}
.header-box { text-align: center; margin-bottom: 20px; margin-top: 15px; }
.header-box h1 { color: var(--primary); margin-bottom: 5px; font-size: 28px; }
.header-box p { color: #64748b; font-weight: bold; margin-top: 0; }

/* --- FORMS & INPUTS --- */
.form-row {
  margin: 20px 0;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Select Dropdown */
.form-select {
  flex: 1;
  min-width: 200px;
  padding: 14px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  outline: none;
  font-weight: 600;
  color: var(--primary);
  background: #fff;
  transition: all 0.25s ease;
}

/* Focus effect */
.form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* Input Group */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

/* Input Field */
.form-input {
  padding: 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  width: 100%;
  font-size: 14px;
  background: #f8fafc;
  transition: all 0.25s ease;
}

/* Focus */
.form-input:focus {
  background: #fff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

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

/* Paste Button */
.btn-paste {
  background: #e2e8f0;
  color: var(--primary);
  border: none;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-paste:hover {
  background: #cbd5f5;
  transform: scale(1.03);
}

/* WhatsApp Button */
.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #1ebe5d);
  color: white;
  border: none;
  padding: 14px 25px;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  display: block;
  margin: 20px auto;
  width: 100%;
  max-width: 300px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(37,211,102,0.3);
}

/* Telegram Button (Secondary CTA) */
.btn-telegram1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #e6f4ff;
  color: #0077cc !important;
  padding: 10px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  margin: 10px auto 15px auto;
  transition: all 0.3s ease;
}

.btn-telegram1:hover {
  background: #dbeafe;
  transform: scale(1.05);
}

/* --- CHECKBOX & ERRORS --- */
.checkbox-container {
  margin: 15px auto;
  max-width: 600px;
  text-align: left;
  background: #f8fafc;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: 0.2s;
}

.checkbox-container:hover {
  border-color: #cbd5e1;
}

.checkbox-container label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Error Text */
.error-text {
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  margin-top: 5px;
  display: none;
  text-align: center;
}

/* --- RADIO / CHECKBOX FIX --- */
input[type="radio"],
input[type="checkbox"] {
  display: inline-block !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 16px !important;
  height: 16px !important;
  position: relative !important;
  margin: 2px 6px 0 0 !important;
  cursor: pointer !important;
}
/* --- TABLES (Questions, Scheme, Stats) --- */
.scheme-table, .stats-table, .q-table { width: 100%; border-collapse: collapse; text-align: center; background: white; }
.scheme-table th, .stats-table th { background-color: #475569; color: white; padding: 10px; border: 1px solid #cbd5e1; }
.scheme-table td, .stats-table td { padding: 10px; border: 1px solid var(--border); font-weight: 600; }
.text-green { color: var(--success); } .text-red { color: var(--danger); }
.row-right { background-color: #dcfce7 !important; color: #166534 !important; font-weight: bold; border-bottom: 1px solid #bbf7d0; }
.row-wrong { background-color: #fee2e2 !important; color: #991b1b !important; font-weight: bold; border-bottom: 1px solid #fecaca; }
.row-bonus { background-color: #fef9c3 !important; color: #854d0e !important; font-weight: bold; border-bottom: 1px solid #fde047; }
.row-unattempted { background-color: #ffffff; color: #475569; }

/* --- SCORE & MERIT CARDS --- */
.score-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 20px; }
.score-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 15px; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05);}
.score-card .val { font-size: 28px; font-weight: bold; color: var(--secondary); }
.score-card span { font-size: 12px; color: #64748b; text-transform: uppercase; display: block; }
.status-badge { display: inline-block; padding: 6px 18px; border-radius: 50px; font-weight: bold; font-size: 18px; vertical-align: middle; }
.pass { background: #dcfce7; color: var(--success); border: 2px solid var(--success); }
.fail { background: #fee2e2; color: var(--danger); border: 2px solid var(--danger); }

.merit-card { margin-top: 20px; border: 2px solid var(--secondary); background: #f8fafc; }
.rank-container { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 15px; }
.rank-box { padding: 15px; border-radius: 8px; flex: 1; min-width: 150px; text-align: center; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.rank-gen { background: white; border-left: 5px solid var(--secondary); }
.rank-cat { background: #eff6ff; border-left: 5px solid var(--success); }
.rank-label { font-size: 14px; font-weight: bold; color: #64748b; } .rank-cat .rank-label { color: var(--success); }
.rank-val { font-size: 28px; font-weight: bold; margin: 5px 0; color: var(--primary); } .rank-cat .rank-val { color: var(--success); }
.rank-total { font-size: 20px; color: #64748b; font-weight: bold; }
.candidate-card { text-align: left; background-color: #f8fafc; margin-bottom: 20px; border-left: 4px solid var(--secondary); }

/* --- BANNERS & ADS --- */
details.accordion summary { padding: 15px; font-weight: bold; cursor: pointer; border-bottom: 1px solid var(--border); background: #f8fafc; }
.global-banner { background: var(--danger); color: white; text-align: center; padding: 10px 15px; font-weight: bold; font-size: 15px; margin-bottom: 10px;}
.exam-notice { background: #fef9c3; border: 1px solid #facc15; color: #854d0e; padding: 12px; border-radius: 6px; margin: 15px auto; max-width: 700px; font-weight: 600; font-size: 14px; text-align: center; }
.premium-ad-box { background-color: var(--card-bg); border: 2px solid #cbd5e1; border-radius: 12px; padding: 15px; margin: 20px auto; max-width: 800px; text-align: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); position: relative; }

/* --- RESULT PAGE MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .upload-area { padding: 15px 8px !important; }
    
    /* This forces the wrapper to allow scrolling if the table is still too wide */
    div[style*="overflow-x"] {
        width: 100% !important;
        display: block !important;
        overflow-x: auto !important;
    }
    
    /* Ensures the table fills the card */
    .scheme-table, .stats-table, .q-table {
        width: 100% !important;
        min-width: 100% !important;
        display: table !important; 
        table-layout: auto !important; 
    }
    
    /* Keep padding/font but allow wrapping */
    .scheme-table th, .stats-table th, 
    .scheme-table td, .stats-table td,
    .q-table th, .q-table td {
        padding: 8px 4px !important; 
        font-size: 12px !important;  
        white-space: normal !important; 
        word-break: break-word !important;
        line-height: 1.2 !important;
    }
}
</style>
