/* Base Styles */
@import url("https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500&family=Orbitron:wght@400;700;900&display=swap");

:root {
  --bg-color: #0a0a12;
  --text-color: #e0e0ff;
  --accent-orange: #ff6b35;
  --accent-orange-glow: rgba(255, 107, 53, 0.5);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 20;
}

/* Background Effects */
.background-gradient {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(255, 107, 53, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 107, 53, 0.05) 0%, transparent 50%),
    linear-gradient(to bottom, #0a0a12, #0f0f1a 50%, #0a0a12);
  z-index: 1;
}

.fog-layer {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, transparent 20%, rgba(10, 10, 18, 0.9) 100%);
  z-index: 2;
  pointer-events: none;
  animation: fog-drift 20s infinite ease-in-out;
}

@keyframes fog-drift {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.5; }
}

/* Ember Particles */
.ember-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.ember-particle {
  position: absolute;
  bottom: 0;
  width: 3px;
  height: 3px;
  background: radial-gradient(circle, #ff6b35, #ff4500);
  border-radius: 50%;
  animation: ember-rise var(--duration, 10s) infinite ease-in;
  opacity: 0;
  box-shadow: 0 0 6px #ff6b35, 0 0 12px #ff4500;
}

@keyframes ember-rise {
  0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  10% { opacity: 0.8; }
  50% { opacity: 0.6; }
  90% { opacity: 0.2; }
  100% { transform: translateY(-100vh) translateX(calc(var(--drift, 20px))) scale(0.5); opacity: 0; }
}

/* Stars */
.stars-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  animation: star-twinkle var(--duration, 3s) infinite ease-in-out;
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Countdown Styles */
header {
  text-align: center;
  margin-bottom: 3rem;
}

.main-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 6px;
  margin-bottom: 0.5rem;
  color: var(--accent-orange);
  /* Removed blurry text-shadow, using clean glow instead */
  text-shadow: 0 0 10px rgba(255, 107, 53, 0.4);
  background: linear-gradient(135deg, #fff, var(--accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#current-exam-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.8rem;
  color: var(--accent-orange);
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.countdown-container {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 3rem;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  margin-bottom: 3rem;
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
}

.number {
  font-family: 'Orbitron', sans-serif;
  font-size: 5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 20px var(--accent-orange-glow);
  line-height: 1;
}

.label {
  margin-top: 0.75rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.6);
}

.exams-list {
  width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
}

.exams-list h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--accent-orange);
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

li {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-orange);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}

li:hover {
  background: rgba(255, 107, 53, 0.08);
  transform: translateY(-5px);
  border-color: rgba(255, 107, 53, 0.3);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

li:hover::before, li.active::before {
  transform: scaleX(1);
}

li.active {
  background: rgba(255, 107, 53, 0.12);
  border-color: rgba(255, 107, 53, 0.4);
}

.exam-name {
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
}

.exam-date {
  font-size: 0.9rem;
  color: var(--accent-orange);
}

.number.finished {
  color: #ff4d4d;
  text-shadow: 0 0 20px rgba(255, 77, 77, 0.6);
}

@media (max-width: 768px) {
  .main-title { font-size: 2.8rem; }
  .number { font-size: 3.5rem; }
  .countdown-container { padding: 2rem 1rem; gap: 1rem; }
  .time-block { min-width: 80px; }
  #current-exam-title { font-size: 1.4rem; }
}
