/* ===== MINIMAL LIVE TIME & DATE - MODERN STYLES ===== */

/* Performance-optimized Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600&display=swap');

/* ===== CSS CUSTOM PROPERTIES (MINIMAL DESIGN SYSTEM) ===== */
:root {
  /* Minimal Color Palette */
  --white: #ffffff;
  --black: #000000;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Accent Colors */
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #1e40af;
  
  /* Semantic Colors */
  --background: var(--white);
  --surface: var(--gray-50);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-400);
  --border: var(--gray-200);
  
  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Monaco', monospace;
  
  /* Font Sizes */
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  --text-4xl: 2.25rem;    /* 36px */
  --text-5xl: 3rem;       /* 48px */
  --text-6xl: 3.75rem;    /* 60px */
  --text-7xl: 4.5rem;     /* 72px */
  --text-8xl: 6rem;       /* 96px */
  --text-9xl: 8rem;       /* 128px */
  
  /* Spacing */
  --space-1: 0.25rem;     /* 4px */
  --space-2: 0.5rem;      /* 8px */
  --space-3: 0.75rem;     /* 12px */
  --space-4: 1rem;        /* 16px */
  --space-6: 1.5rem;      /* 24px */
  --space-8: 2rem;        /* 32px */
  --space-12: 3rem;       /* 48px */
  --space-16: 4rem;       /* 64px */
  --space-20: 5rem;       /* 80px */
  --space-24: 6rem;       /* 96px */
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --background: var(--gray-900);
    --surface: var(--gray-800);
    --text-primary: var(--white);
    --text-secondary: var(--gray-300);
    --text-muted: var(--gray-500);
    --border: var(--gray-700);
  }
}

/* ===== RESET & BASE STYLES ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ===== MAIN APP LAYOUT ===== */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  max-width: 100%;
  margin: 0 auto;
}

/* ===== CLOCK WRAPPER ===== */
.clock-wrapper {
  text-align: center;
  padding: var(--space-8);
  background: var(--surface);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.clock-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--accent);
}

/* ===== TIME DISPLAY ===== */
.time-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  font-weight: 300;
  letter-spacing: -0.05em;
  font-size: clamp(var(--text-6xl), 15vw, var(--text-9xl));
  color: var(--text-primary);
  transition: all var(--transition-normal);
}

.hours,
.minutes {
  font-weight: 500;
  transition: color var(--transition-fast);
}

.separator {
  opacity: 0.6;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 50% { opacity: 0.6; }
  51%, 100% { opacity: 0.2; }
}

.period {
  font-size: 0.4em;
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: var(--space-1);
  transition: color var(--transition-fast);
}

/* ===== DATE DISPLAY ===== */
.date-display {
  font-size: clamp(var(--text-lg), 4vw, var(--text-2xl));
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.025em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1);
  transition: color var(--transition-fast);
}

.day-name {
  font-weight: 500;
  color: var(--accent);
}

.date-part {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
  justify-content: center;
}

.comma {
  margin-right: var(--space-1);
}

/* ===== FOOTER ===== */
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-8);
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
}

.foot .credit {
  margin: 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.chinmay-link {
  background: linear-gradient(90deg, #a855f7, #ec4899, #fbbf24) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-size: 200% auto !important;
  transition: background-position 0.5s ease !important;
  text-decoration: none !important;
}
.chinmay-link:hover,
.chinmay-link:focus,
.chinmay-link:active{
  background-position: right center !important;
  -webkit-text-fill-color:transparent !important;
  text-decoration:none !important;
  filter:none !important;
}

.copyright {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 400;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile Portrait */
@media (max-width: 480px) {
  .container {
    padding: var(--space-4);
  }
  
  .clock-wrapper {
    padding: var(--space-6);
    margin: var(--space-2);
  }
  
  .time-display {
    font-size: clamp(var(--text-5xl), 20vw, var(--text-7xl));
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .period {
    font-size: 0.5em;
    margin-left: 0;
    margin-top: var(--space-1);
  }
  
  .date-display {
    font-size: clamp(var(--text-base), 5vw, var(--text-lg));
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
  }
  
  .foot {
    flex-direction: column;
    text-align: center;
    gap: var(--space-2);
    padding: var(--space-4);
  }
}

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
  .container {
    padding: var(--space-3);
  }
  
  .clock-wrapper {
    padding: var(--space-4);
  }
  
  .time-display {
    font-size: clamp(var(--text-4xl), 12vw, var(--text-6xl));
    margin-bottom: var(--space-2);
  }
  
  .date-display {
    font-size: clamp(var(--text-sm), 3vw, var(--text-lg));
  }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 1024px) {
  .clock-wrapper {
    padding: var(--space-8) var(--space-12);
  }
  
  .time-display {
    font-size: clamp(var(--text-7xl), 12vw, var(--text-8xl));
  }
  
  .date-display {
    font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
  }
}

/* Desktop */
@media (min-width: 1025px) {
  .container {
    padding: var(--space-8);
  }
  
  .clock-wrapper {
    padding: var(--space-12) var(--space-16);
    min-width: 600px;
  }
  
  .time-display {
    font-size: clamp(var(--text-8xl), 10vw, var(--text-9xl));
  }
  
  .date-display {
    font-size: var(--text-2xl);
  }
  
  .foot {
    padding: var(--space-6) var(--space-12);
  }
}

/* Large Desktop */
@media (min-width: 1440px) {
  .container {
    padding: var(--space-12);
  }
  
  .clock-wrapper {
    padding: var(--space-16) var(--space-20);
    min-width: 700px;
  }
}

/* ===== ACCESSIBILITY & MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --border: var(--black);
    --text-secondary: var(--black);
    --text-muted: var(--gray-700);
  }
  
  .clock-wrapper {
    border-width: 2px;
    box-shadow: none;
  }
  
  .chinmay-link {
    text-decoration: none;
  }
}

/* Print Styles */
@media print {
  .foot {
    display: none;
  }
  
  .clock-wrapper {
    background: transparent;
    border: 2px solid var(--black);
    box-shadow: none;
  }
  
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Selection styles */
::selection {
  background: var(--accent);
  color: var(--white);
}

::-moz-selection {
  background: var(--accent);
  color: var(--white);
}


