/* ============================================
   Fullscreen Current Time Display - CSS
   WordPress Web Tool - Neobrutalism Design
   ============================================ */

/* Global box-sizing */
.fullscreen-time-container,
.fullscreen-time-container *,
.fullscreen-time-container *::before,
.fullscreen-time-container *::after {
  box-sizing: border-box;
}

/* ============================================
   CSS Variables - Light Mode (Default)
   ============================================ */
.fullscreen-time-container {
  /* Background colors */
  --bg-primary: #f5f5f0;
  --bg-secondary: #fff;
  --bg-section: #fff;
  
  /* Borders */
  --border-color: #333;
  
  /* Text colors */
  --text-primary: #222;
  --text-secondary: #555;
  --text-light: #666;
  
  /* Brand colors */
  --color-accent: #3498db;
  --color-success: #27ae60;
  --color-warning: #f39c12;
  --color-danger: #e74c3c;
  --color-purple: #9b59b6;
  --color-teal: #1abc9c;
  
  /* Shadows (neobrutalism) */
  --shadow-sm: 2px 2px 0 rgba(0,0,0,0.1);
  --shadow-md: 4px 4px 0 rgba(0,0,0,0.15);
  --shadow-lg: 8px 8px 0 rgba(0,0,0,0.15);
  
  /* Border radius */
  --radius-container: 8px;
  --radius-section: 6px;
  --radius-button: 4px;
  --radius-input: 4px;
  
  /* Input focus */
  --input-focus-bg: #fffacd;
  
  /* Header title */
  --title-color: #2c3e50;
  --title-shadow: 2px 2px 0 rgba(255,255,255,0.5);
  
  /* Button hover background */
  --btn-hover-overlay: rgba(0,0,0,0.1);
}

/* ============================================
   CSS Variables - Manual Dark Mode
   ============================================ */
.fullscreen-time-container.dark {
  /* Background colors */
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-section: #2d2d2d;
  
  /* Borders */
  --border-color: #e0e0e0;
  
  /* Text colors */
  --text-primary: #e8e8e8;
  --text-secondary: #b0b0b0;
  --text-light: #909090;
  
  /* Brand colors - brighter for dark bg */
  --color-accent: #5dade2;
  --color-success: #52c77a;
  --color-warning: #f5b041;
  --color-danger: #ec7063;
  --color-purple: #af7ac5;
  --color-teal: #48d1cc;
  
  /* Shadows */
  --shadow-sm: 2px 2px 0 rgba(255,255,255,0.08);
  --shadow-md: 4px 4px 0 rgba(255,255,255,0.12);
  --shadow-lg: 8px 8px 0 rgba(255,255,255,0.12);
  
  /* Input focus */
  --input-focus-bg: #3a3a3a;
  
  /* Header title */
  --title-color: #7fb3d5;
  --title-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  
  /* Button hover background */
  --btn-hover-overlay: rgba(255,255,255,0.1);
}

/* ============================================
   System Dark Mode Auto Detection
   ============================================ */
@media (prefers-color-scheme: dark) {
  .fullscreen-time-container:not(.dark):not(.light) {
    /* Background colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-section: #2d2d2d;
    
    /* Borders */
    --border-color: #e0e0e0;
    
    /* Text colors */
    --text-primary: #e8e8e8;
    --text-secondary: #b0b0b0;
    --text-light: #909090;
    
    /* Brand colors */
    --color-accent: #5dade2;
    --color-success: #52c77a;
    --color-warning: #f5b041;
    --color-danger: #ec7063;
    --color-purple: #af7ac5;
    --color-teal: #48d1cc;
    
    /* Shadows */
    --shadow-sm: 2px 2px 0 rgba(255,255,255,0.08);
    --shadow-md: 4px 4px 0 rgba(255,255,255,0.12);
    --shadow-lg: 8px 8px 0 rgba(255,255,255,0.12);
    
    /* Input focus */
    --input-focus-bg: #3a3a3a;
    
    /* Header title */
    --title-color: #7fb3d5;
    --title-shadow: 2px 2px 0 rgba(0,0,0,0.5);
    
    /* Button hover background */
    --btn-hover-overlay: rgba(255,255,255,0.1);
  }
}

/* ============================================
   Main Container
   ============================================ */
.fullscreen-time-container {
  position: relative;
  max-width: 800px;
  width: 100%;
  margin: 8px auto;
  padding: 8px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-container);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  line-height: 1.5;
}

/* ============================================
   Dark Mode Toggle Button
   ============================================ */
.fullscreen-time-container .dark-mode-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
  z-index: 10;
}

.fullscreen-time-container .dark-mode-toggle:hover {
  transform: translate(0.5px, 0.5px);
  box-shadow: 1.5px 1.5px 0 rgba(0,0,0,0.15);
}

.fullscreen-time-container .dark-mode-toggle:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* ============================================
   Header
   ============================================ */
.fullscreen-time-container .header {
  text-align: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.fullscreen-time-container .main-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--title-color);
  text-shadow: var(--title-shadow);
  margin: 0 0 4px 0;
}

.fullscreen-time-container .subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================
   2-Column Grid Layout
   ============================================ */
.fullscreen-time-container .main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ============================================
   Sections
   ============================================ */
.fullscreen-time-container .time-section,
.fullscreen-time-container .settings-section {
  background: var(--bg-section);
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-section);
  box-shadow: var(--shadow-md);
}

.fullscreen-time-container .section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.fullscreen-time-container .section-header svg {
  width: 18px;
  height: 18px;
  stroke: var(--color-accent);
}

/* ============================================
   Time Display
   ============================================ */
.fullscreen-time-container .time-display {
  text-align: center;
  padding: 20px 8px;
}

.fullscreen-time-container .time-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.fullscreen-time-container .time-main {
  font-size: 48px;
  font-weight: 800;
  color: var(--color-accent);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.fullscreen-time-container .time-ampm {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-accent);
  opacity: 0.8;
}

.fullscreen-time-container .time-date {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ============================================
   Fullscreen Button
   ============================================ */
.fullscreen-time-container .fullscreen-btn {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  background: var(--color-accent);
  color: #fff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-button);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.fullscreen-time-container .fullscreen-btn:hover {
  filter: brightness(1.05);
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.2);
}

.fullscreen-time-container .fullscreen-btn:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

/* ============================================
   Settings
   ============================================ */
.fullscreen-time-container .setting-group {
  margin-bottom: 8px;
}

.fullscreen-time-container .setting-group:last-child {
  margin-bottom: 0;
}

.fullscreen-time-container .setting-group > label {
  display: block;
  margin-bottom: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.fullscreen-time-container .radio-group {
  display: flex;
  gap: 8px;
}

.fullscreen-time-container .radio-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  transition: all 0.2s;
}

.fullscreen-time-container .radio-label:hover {
  background: var(--input-focus-bg);
}

.fullscreen-time-container .radio-label input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.fullscreen-time-container .radio-label input[type="radio"]:checked + span {
  color: var(--color-accent);
  font-weight: 600;
}

/* ============================================
   Toast Notification
   ============================================ */
.fullscreen-time-container .toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-button);
  padding: 10px 15px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 1000;
  max-width: 300px;
}

.fullscreen-time-container .toast.show {
  opacity: 1;
  transform: translateY(0);
}

.fullscreen-time-container .toast svg {
  color: var(--color-success);
  stroke: var(--color-success);
  flex-shrink: 0;
}

.fullscreen-time-container .toast-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fullscreen-time-container .toast-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.fullscreen-time-container .toast-value {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ============================================
   Fullscreen Overlay
   ============================================ */
.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  cursor: none;
}

.fullscreen-overlay.active {
  display: flex;
}

.fullscreen-overlay.show-controls {
  cursor: default;
}

.fullscreen-time-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.fullscreen-time-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1.5vw;
  white-space: nowrap;
}

.fullscreen-time-main {
  font-size: 22vw;
  font-weight: 800;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: -0.03em;
  line-height: 1;
  text-align: center;
  transition: color 0.3s, opacity 0.3s;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.fullscreen-time-ampm {
  font-size: 4vw;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-align: center;
  transition: opacity 0.3s;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.fullscreen-time-date {
  font-size: 3.5vw;
  color: rgba(255,255,255,0.6);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
  margin-top: 2vh;
  text-align: center;
  transition: opacity 0.3s;
}

/* ============================================
   Fullscreen Controls
   ============================================ */
.fullscreen-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.fullscreen-overlay.show-controls .fullscreen-controls {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fullscreen-controls .control-group {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
}

.fullscreen-controls .control-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.fullscreen-controls .control-group label svg {
  stroke: rgba(255,255,255,0.8);
}

/* Brightness Slider */
.fullscreen-controls input[type="range"] {
  width: 120px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  cursor: pointer;
}

.fullscreen-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.fullscreen-controls input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Color Buttons */
.fullscreen-controls .color-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 280px;
  justify-content: center;
}

.fullscreen-controls .color-btn {
  width: 26px;
  height: 26px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.fullscreen-controls .color-btn:hover {
  transform: scale(1.15);
  border-color: rgba(255,255,255,0.9);
}

.fullscreen-controls .color-btn.active {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

/* Exit Fullscreen Button */
.fullscreen-controls .exit-fullscreen-btn {
  padding: 10px 20px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fullscreen-controls .exit-fullscreen-btn:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.6);
}

.fullscreen-controls .exit-fullscreen-btn svg {
  stroke: #fff;
}

/* ============================================
   Responsive - Tablet (768px or less)
   ============================================ */
@media (max-width: 768px) {
  .fullscreen-time-container {
    margin: 6px 5px;
    padding: 7px;
    width: calc(100% - 10px);
  }
  
  .fullscreen-time-container .main-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .fullscreen-time-container .main-title {
    font-size: 24px;
  }
  
  .fullscreen-time-container .section-header {
    font-size: 15px;
  }
  
  .fullscreen-time-container .dark-mode-toggle {
    font-size: 14px;
    padding: 5px 8px;
  }
  
  .fullscreen-time-container .time-main {
    font-size: 40px;
  }
  
  .fullscreen-time-main {
    font-size: 18vw;
    letter-spacing: -0.03em;
  }
  
  .fullscreen-time-ampm {
    font-size: 5vw;
  }
  
  .fullscreen-time-date {
    font-size: 4vw;
  }
  
  .fullscreen-time-row {
    gap: 1.5vw;
  }
  
  .fullscreen-controls {
    gap: 15px;
    padding: 15px;
  }
  
  .fullscreen-controls .control-group {
    font-size: 13px;
  }
  
  .fullscreen-controls input[type="range"] {
    width: 80px;
  }
}

/* ============================================
   Responsive - Mobile (480px or less)
   ============================================ */
@media (max-width: 480px) {
  .fullscreen-time-container {
    padding: 6px;
    border-width: 1px;
  }
  
  .fullscreen-time-container .main-title {
    font-size: 22px;
  }
  
  .fullscreen-time-container .subtitle {
    font-size: 12.5px;
  }
  
  .fullscreen-time-container .time-main {
    font-size: 32px;
  }
  
  .fullscreen-time-container .time-date {
    font-size: 14px;
  }
  
  .fullscreen-time-container .fullscreen-btn {
    font-size: 14px;
    padding: 8px;
  }
  
  .fullscreen-time-container .radio-group {
    flex-direction: column;
    gap: 6px;
  }
  
  .fullscreen-time-container .radio-label {
    width: 100%;
    justify-content: center;
  }
  
  .fullscreen-time-main {
    font-size: 16vw;
    letter-spacing: -0.04em;
  }
  
  .fullscreen-time-ampm {
    font-size: 5vw;
  }
  
  .fullscreen-time-date {
    font-size: 3.8vw;
  }
  
  .fullscreen-time-row {
    gap: 1vw;
  }
  
  .fullscreen-controls {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  
  .fullscreen-controls .control-group {
    width: 100%;
    justify-content: center;
  }
  
  .fullscreen-controls .exit-fullscreen-btn {
    width: 100%;
    justify-content: center;
  }
}