:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #6c757d;
    --success-color: #16a34a;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --animation-duration: 0.3s;
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
  }
  
  [data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #94a3b8;
    --success-color: #22c55e;
    --background-color: #0f172a;
    --card-background: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      sans-serif;
  }
  
  body {
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 2rem;
    transition: all var(--animation-duration) ease;
    min-height: 100vh;
  }
  
  .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
  }
  
  .header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
  }
  
  .header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 700;
  }
  
  .dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
  }
  
  .card {
    background-color: var(--card-background);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    transition: all var(--animation-duration) cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
  }
  
  .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
  
  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
  }
  
  .card-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
  }
  
  .badge {
    background-color: var(--primary-color);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.025em;
  }
  
  .time-display {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 1.5rem 0;
    color: var(--text-primary);
  }
  
  .lecture-info {
    margin-top: 1.5rem;
  }
  
  .lecture-info p {
    color: var(--text-secondary);
    margin: 0.75rem 0;
    font-size: 1rem;
  }
  
  .current {
    border-left: 4px solid var(--success-color);
    padding-left: 1rem;
  }
  
  .buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
  }
  
  button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--animation-duration) ease;
    box-shadow: var(--shadow-sm);
  }
  
  button:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
  }
  
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    backdrop-filter: blur(4px);
  }
  
  .modal-content {
    background-color: var(--card-background);
    margin: 4% auto;
    padding: 2.5rem;
    width: 95%;
    max-width: 1000px;
    border-radius: var(--border-radius-lg);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
  }
  
  .close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--animation-duration) ease;
  }
  
  .close:hover {
    color: var(--text-primary);
  }
  
  .timetable-container {
    width: 100%;
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
  }
  
  .timetable {
    width: 100%;
    min-width: 800px;
    border-collapse: separate;
    border-spacing: 0;
    background-color: var(--card-background);
  }
  
  .timetable th,
  .timetable td {
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    text-align: left;
  }
  
  .timetable th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
  }
  
  .timetable th:first-child {
    border-top-left-radius: var(--border-radius-sm);
  }
  
  .timetable th:last-child {
    border-top-right-radius: var(--border-radius-sm);
  }
  
  .timetable tr:nth-child(even) {
    background-color: color-mix(in srgb, var(--card-background) 97%, var(--text-primary));
  }
  
  .timetable tr:hover {
    background-color: color-mix(in srgb, var(--primary-color) 5%, var(--card-background));
  }
  
  .settings-form {
    display: grid;
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .form-group {
    display: grid;
    gap: 0.75rem;
  }
  
  .form-group label {
    font-weight: 500;
    color: var(--text-primary);
  }
  
  .form-group input,
  .form-group select {
    padding: 0.875rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--card-background);
    color: var(--text-primary);
    transition: all var(--animation-duration) ease;
  }
  
  .form-group input:focus,
  .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 25%, transparent);
  }
  
  .toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--success-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-md);
    opacity: 0;
    transform: translateY(1rem);
    transition: all var(--animation-duration) cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    box-shadow: var(--shadow-lg);
  }
  
  .toast.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  @media (max-width: 768px) {
    body {
      padding: 1rem;
    }
  
    .container {
      padding: 0.5rem;
    }
  
    .dashboard {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }
  
    .modal-content {
      margin: 2rem 1rem;
      padding: 1.5rem;
    }
  
    .time-display {
      font-size: 1.75rem;
    }
  
    .buttons {
      grid-template-columns: 1fr;
    }
  
    .timetable-container {
      margin: 1rem -1rem;
      border-radius: 0;
    }
  }
  
  @media (min-width: 2000px) {
    .container {
      max-width: 1800px;
    }
  }
  
  @supports (scrollbar-width: thin) {
    .modal-content,
    .timetable-container {
      scrollbar-width: thin;
      scrollbar-color: var(--primary-color) var(--card-background);
    }
  }
  
  @supports selector(::-webkit-scrollbar) {
    .modal-content::-webkit-scrollbar,
    .timetable-container::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }
  
    .modal-content::-webkit-scrollbar-track,
    .timetable-container::-webkit-scrollbar-track {
      background: var(--card-background);
    }
  
    .modal-content::-webkit-scrollbar-thumb,
    .timetable-container::-webkit-scrollbar-thumb {
      background: var(--primary-color);
      border-radius: 4px;
    }
  }