* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
  background-color: #F8F9FA;
  color: #333;
}

header {
  background-color: #ffffff;
  padding: 20px;
  text-align: center;
  border-bottom: 2px solid #E9ECEF;
}

header h1 {
  color: #4A90E2;
  font-size: 24px;
}

header p {
  color: #6c757d;
  font-size: 14px;
}

/* Date Ribbon */
.date-ribbon {
  display: flex;
  overflow-x: auto;
  padding: 15px 20px;
  gap: 10px;
  background: white;
  border-bottom: 1px solid #E9ECEF;
}

.date-ribbon::-webkit-scrollbar {
  display: none;
}

.date-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 65px;
  padding: 10px;
  border-radius: 12px;
  background: #f1f3f5;
  color: #6c757d;
}

.date-card.active-tomorrow {
  background: #4A90E2;
  color: white;
  box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

.date-card .day {
  font-size: 12px;
  font-weight: 600;
}

.date-card .num {
  font-size: 18px;
  font-weight: bold;
}

.badge {
  font-size: 10px;
  background: white;
  color: #4A90E2;
  padding: 2px 6px;
  border-radius: 8px;
  margin-top: 4px;
  font-weight: bold;
}

/* Schedule Cards */
.schedule-container {
  padding: 20px;
}

.time-block {
  margin-bottom: 20px;
}

.time {
  font-size: 13px;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 8px;
}

.subject-card {
  background: white;
  padding: 15px;
  border-radius: 12px;
  border-left: 5px solid #4A90E2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.subject-card h2 {
  font-size: 18px;
  margin-bottom: 5px;
}

.note-badge {
  display: inline-block;
  font-size: 11px;
  background: #e7f1ff;
  color: #0056b3;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.split-group {
  display: flex;
  justify-content: space-between;
  border-left: 5px solid #82c2ff;
}

.group-col {
  width: 48%;
}

.group-col h3 {
  font-size: 14px;
  color: #4A90E2;
  margin-bottom: 4px;
}

.group-col p {
  font-size: 14px;
  color: #555;
}

.divider {
  width: 1px;
  background: #E9ECEF;
}
/* Gateway Overlay Styles */
.gateway-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(240, 244, 248, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000; /* Keep it on top */
}

.gateway-card {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  width: 90%;
  max-width: 350px;
  text-align: center;
}

.gateway-card h2 {
  color: #1a3b5c;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.gateway-card p {
  color: #64748b;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.gateway-btn {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: none;
  border-radius: 10px;
  background-color: #3b82f6;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.gateway-btn:hover { background-color: #2563eb; }

.gateway-btn.outline {
  background-color: transparent;
  color: #3b82f6;
  border: 2px solid #3b82f6;
}

.gateway-btn.text-only {
  background: none;
  color: #64748b;
  box-shadow: none;
  font-weight: 500;
}

.gateway-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
}

.error-msg {
  color: #ef4444 !important;
  font-size: 0.85rem !important;
  margin-top: -5px;
  margin-bottom: 15px !important;
}

/* Subtle Footer Styles */
.app-footer {
  text-align: center;
  padding: 30px 20px;
  margin-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.app-footer p {
  color: #94a3b8;
  font-size: 0.85rem;
  margin: 0 0 5px 0;
}

.app-footer strong {
  color: #64748b;
}

.contact-link {
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}
/* Admin Control Panel Styles */
.admin-panel {
  background: #ffffff;
  border: 2px dashed #4A90E2;
  border-radius: 12px;
  padding: 20px;
  margin: 20px;
  text-align: center;
}

.admin-panel h3 {
  color: #4A90E2;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.admin-btn {
  background-color: #4A90E2;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.admin-btn:hover {
  background-color: #3b82f6;
}
/* Admin Modal Styles */
.admin-modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Dark semi-transparent background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.modal-content h3 {
  color: #4A90E2;
  margin: 0;
  font-size: 1.2rem;
  text-align: center;
}

.admin-input {
  padding: 10px;
  border: 1px solid #E9ECEF;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.modal-actions .admin-btn {
  flex: 1; /* Makes buttons equal width */
}

.cancel-btn {
  background-color: #6c757d;
}

.cancel-btn:hover {
  background-color: #5a6268;
}
/* University Gateway Branding */
.uni-branding {
  text-align: center;
  margin-bottom: 20px;
}

.uni-logo {
  width: 110px;
  height: auto;
  margin-bottom: 10px;
}

.uni-subtitle {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Schedule Alert Badge */
.class-alert {
  color: #D32F2F; /* Deep alarming red */
  background-color: #FFEBEE; /* Light red background */
  font-size: 0.85rem;
  font-weight: bold;
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #D32F2F;
  margin-top: 8px;
  animation: pulse 2s infinite; /* Optional: adds a subtle blink effect */
}

/* Subtle pulse animation to draw attention to exams */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}
/* Subject Resource Modal Styling */
.resource-section {
  margin-top: 20px;
  text-align: left;
}

.resource-section h4 {
  color: #4A90E2;
  font-size: 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

.resource-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.resource-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8f9fa;
  padding: 10px 15px;
  margin-bottom: 8px;
  border-radius: 6px;
  font-size: 14px;
}

.resource-list li a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  flex-grow: 1;
}

.resource-list li a:hover {
  color: #4A90E2;
}

.delete-resource-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.7;
  padding: 5px;
}

.delete-resource-btn:hover {
  opacity: 1;
}

/* Hide admin UI elements by default for normal students */
.admin-ui {
  display: none;
}
/* Live Announcement Banner */
.live-alert {
  background-color: #FFF3CD;
  color: #856404;
  padding: 12px 15px;
  margin: 10px 20px;
  border-radius: 8px;
  border-left: 5px solid #FFC107;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
/* ==========================================
   4. LOGIN GATEWAY SYSTEM
   ========================================== */
.login-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f4f7f6; /* Solid clinical background to hide the schedule */
  z-index: 9999; /* Keeps it strictly on top of everything */
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-card {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  text-align: center;
  width: 90%;
  max-width: 350px;
  border-top: 6px solid #4A90E2; 
}

.login-card h2 {
  color: #333;
  margin-bottom: 10px;
  font-size: 20px;
}

.login-card p {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
}

.login-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
  text-align: center;
}

.login-input:focus {
  outline: none;
  border-color: #4A90E2;
  box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
}

.login-card label {
  display: block;
  text-align: left;
  font-size: 13px;
  font-weight: bold;
  color: #555;
  margin-bottom: 5px;
}
/* ==========================================
   5. POMODORO TIMER
   ========================================== */
.pomodoro-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Dark transparent overlay */
  z-index: 9999; 
  display: flex;
  justify-content: center;
  align-items: center;
}

.pomodoro-card {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  text-align: center;
  width: 90%;
  max-width: 350px;
  border-top: 6px solid #e74c3c; /* Pomodoro Red */
}

.timer-display {
  font-size: 56px;
  font-weight: bold;
  color: #333;
  margin: 15px 0;
  font-family: monospace;
}

.timer-modes {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.mode-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  background: #f4f7f6;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  color: #555;
}

.mode-btn.active {
  background: #e74c3c;
  color: white;
  border-color: #e74c3c;
}

.timer-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.timer-controls .admin-btn {
  flex: 1;
  margin: 0;
}
/* ==========================================
   6. DRIFT GAME MENU
   ========================================== */
.car-hitbox {
  position: absolute;
  background-color: transparent;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.2s, border 0.2s;
}

/* Adds a yellow flash when the user taps or hovers over a car */
.car-hitbox:hover, .car-hitbox:active {
  background-color: rgba(255, 215, 0, 0.2);
  border: 2px solid rgba(255, 215, 0, 0.8);
}