/* 1. Reset everything to remove default browser white space */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 2. Page layout - with Safari fixes */
body {
  min-height: 100vh;
  min-height: -webkit-fill-available; /* Safari fix */
  background-color: #d9cec1;
  font-family: sans-serif;
  transition: background-color 0.5s ease, color 0.5s ease;
  -webkit-text-size-adjust: 100%; /* Prevent text scaling */
}

/* Page shell centering */
.page-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0.75rem 0; /* Add side padding for mobile */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Landing header - better mobile spacing */
.landing-header {
  text-align: center;
  margin-bottom: 1rem;
  width: 100%;
  padding: 0 0.5rem; /* Add breathing room on small screens */
}

.landing-header h1 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem; /* Slightly smaller on mobile */
  line-height: 1.3;
}

.landing-header p {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.landing-header .landing-sub {
  color: #4b5563;
  font-size: 0.85rem;
}

/* 3. The Clock Container */
.clock-container {
  width: 90vw;           /* 90% of viewport width */
  max-width: 700px;      /* but cap at 700px on very large screens */
  max-height: 700px;
  margin: 1rem auto 0;   /* center on page, below header */
  position: relative;
  aspect-ratio: 1/1;     /* keep it square */
}

#clock-svg {
  width: 100%;           /* scale to container */
  height: auto;
  display: block;
}

/* Bigger on phones - fills most of screen */
@media (max-width: 600px) {
  .clock-container {
    width: 92vw;
    max-width: 92vw;
    max-height: 92vw;
    margin-top: 0.25rem;
  }
  .landing-header {
    margin-bottom: 0.25rem;  /* tighter spacing */
  }
  
  .landing-header h1 {
    font-size: 1.3rem;  /* slightly smaller title to save vertical space */
  }
  
  .landing-header p {
    font-size: 0.85rem;  /* smaller description text */
  }
  
}

/* 4. Make the SVG fill that container perfectly */
svg {
  width: 100%;
  height: 100%;
  display: block; /* Removes tiny hidden gaps for text alignment */
}

/* Safari emoji fix */
svg text {
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Emoji", sans-serif;
}

/* Day / Night Colors */
body.day-mode {
  background: linear-gradient(135deg, #e8f4f8 0%, #d4e8f0 100%);
}

body.night-mode {
  background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
  color: #ffffff;  /* default text color at night */
}

/* General night text (header, paragraphs) */
body.night-mode h1,
body.night-mode p {
  color: #ffffff;
}

/* Font styling (numbers not used now but kept) */
.clock-number {
  font-size: 16px; /* Slightly larger for small screens */
  font-weight: bold;
  fill: #333;
  font-family: "Arial", sans-serif;
}

body.night-mode .clock-number {
  fill: #fff;
}

/* NOTE: No night-mode override for #hour-hand,
   so it stays its normal dark color in both modes. */

/* ===== ENHANCED FEATURES ===== */

/* Current activity highlighting */
.current-activity {
  opacity: 0.9 !important;
  filter: brightness(1.15);
}

/* Pulsing animation for current activity emoji */
.current-icon {
  animation: iconPulse 1.5s ease-in-out infinite !important;
  transform-origin: center center;
}

/* Pulse inward toward the clock center */
@keyframes iconPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Transition warning pulse effect */
body.transition-warning .clock-container {
  animation: pulse 0.5s ease-in-out 3;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

/* Activity labels styling - closer to clock, no big gap */
#current-activity {
  position: relative;
  margin-top: 0.75rem;
  text-align: center;
  width: 100%;
}

.now-label {
  font-size: 4vmin;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 1vh;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.next-label {
  font-size: 3vmin;
  color: #5a6c7d;
  font-weight: 500;
}

/* Night-mode label colors (white-ish text) */
body.night-mode .now-label {
  color: #ffffff;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
}

body.night-mode .next-label {
  color: #dde7f5;
}

/* Smooth transitions for all elements */
svg path,
svg text {
  transition: all 0.3s ease;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .now-label {
    font-size: 5vmin;
  }

  .next-label {
    font-size: 3.5vmin;
  }
}

@media (max-width: 480px) {
  .now-label {
    font-size: 6vmin;
  }

  .next-label {
    font-size: 4vmin;
  }
}














