/* Base Styles */
:root {
  --primary-color: #4361ee;
  --secondary-color: #3a0ca3;
  --accent-color: #f72585;
  --text-color: #2b2d42;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --border-radius: 16px;
  --box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #f8f9fa;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  transition: var(--transition);
  line-height: 1.6;
}

/* Week Schedule */
#week-schedule {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 800px;
  margin: 20px 0;
  flex: 0 0 auto;
}

#week-schedule p {
  background-color: var(--primary-color);
  color: white;
  padding: 24px 0;
  text-align: center;
  border-radius: var(--border-radius);
  font-weight: bold;
  font-size: 2.5rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

/* Info Block */
#info-block {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 40px;
  width: 100%;
  max-width: 800px;
  text-align: center;
  box-shadow: var(--box-shadow);
  margin: 20px 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#day-type {
  font-size: 4rem;
  font-weight: bold;
  margin-bottom: 16px;
  color: var(--primary-color);
}

#description {
  font-size: 2rem;
  margin-bottom: 40px;
  opacity: 0.9;
}

#block {
  margin-top: 40px;
}

#clock {
  font-size: 6rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  color: var(--accent-color);
  margin: 20px 0;
}

/* Footer */
#footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 800px;
  margin-top: 20px;
  flex: 0 0 auto;
}

#verison-num {
  background: none;
  border: none;
  color: var(--text-color);
  opacity: 0.7;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 12px;
  transition: var(--transition);
}

#verison-num:hover {
  opacity: 1;
}

#help {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 1.2rem;
  transition: var(--transition);
}

#help:hover {
  background-color: rgba(67, 97, 238, 0.1);
}

/* Grade Selector */
#grade-selector {
  display: flex;
  gap: 16px;
  margin: 20px 0;
  width: 100%;
  max-width: 800px;
  flex: 0 0 auto;
}

#grade-selector button {
  padding: 20px 30px;
  border: none;
  border-radius: 30px;
  background-color: var(--card-bg);
  color: var(--text-color);
  font-weight: bold;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--box-shadow);
  flex: 1;
}

#grade-selector button:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Active State for Grade Buttons */
#grade-selector button.active {
  background-color: var(--primary-color);
  color: white;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  body {
    padding: 15px;
    justify-content: center;
  }
  
  #week-schedule p {
    padding: 20px 0;
    font-size: 2rem;
  }
  
  #day-type {
    font-size: 3rem;
  }
  
  #clock {
    font-size: 4rem;
  }
  
  #info-block {
    padding: 30px;
  }
  
  #description {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }
  
  #grade-selector button {
    padding: 16px;
    font-size: 1.2rem;
  }
  
  #verison-num, #help {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  #week-schedule {
    gap: 10px;
  }
  
  #week-schedule p {
    padding: 16px 0;
    font-size: 1.8rem;
  }
  
  #day-type {
    font-size: 2.5rem;
  }
  
  #clock {
    font-size: 3.5rem;
  }
  
  #description {
    font-size: 1.3rem;
  }
  
  #info-block {
    padding: 20px;
  }
  
  #grade-selector {
    flex-direction: column;
    gap: 10px;
  }
}

/* Animation for clock */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

#clock {
  animation: pulse 2s infinite;
}