:root {
  /* Base Variables */
  --primary: #00d9ff;
  --secondary: #7c3aed;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --dark: #0f0f23;
  --darker: #050510;
  --light: #ffffff;
  --gray: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.05);
  --glow: 0 0 40px var(--primary);
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --border-radius-lg: 2rem;
  
  /* Dynamic Variables */
  --font-scale: 1;
  --border-radius: 1rem;
  --spacing: 1rem;
}

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

html, body {
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 50%, #1a1a2e 100%);
  color: var(--light);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
  user-select: none;
  position: relative;
  font-size: calc(16px * var(--font-scale));
}

/* Compact mode adjustments */
body.compact-mode {
  --spacing: 0.5rem;
  --border-radius: 0.5rem;
}

body.compact-mode .main-display {
  padding: 2rem;
}

body.compact-mode .control-panel {
  padding: 0.5rem;
  gap: 0.5rem;
}

/* Animated Background */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.3;
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  opacity: 0.1;
  animation: float 20s infinite linear;
  filter: blur(1px);
}

@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); }
  100% { transform: translateY(-100vh) rotate(360deg); }
}

/* Start Screen Enhancement */
.start-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--darker), var(--dark));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 1s ease;
}

.start-content {
  text-align: center;
  z-index: 10;
}

.logo {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2rem;
  animation: pulse 2s infinite;
}

.subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 3rem;
  animation: fadeInUp 1s ease 0.5s both;
}

.continue-prompt {
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.5);
  animation: breathe 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Glass morphism container */
.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  backdrop-filter: blur(20px);
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.main-display {
  text-align: center;
  padding: 4rem;
  border-radius: var(--border-radius-lg);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.main-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 60px rgba(0, 217, 255, 0.5);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
  position: relative;
}

.date-display {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--light);
  opacity: 0.7;
  margin-bottom: 1rem;
  display: none;
}

.date-display.show {
  display: block;
}

.timer {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 500;
  color: var(--primary);
  text-shadow: var(--glow);
  margin-bottom: 1rem;
  opacity: 0.9;
}

.status {
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.8;
}

/* Goal Progress */
.goal-progress {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.goal-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.goal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), var(--primary));
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-display {
    padding: 2rem;
    margin: 1rem;
  }
  
  .clock {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }
}

/* Focus states for accessibility */
*:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}