/*
 * Countdown - Study'N Fun Hub dijital zamanlayici
 * Arke tasarim sistemi (natural colors + 20px spacing)
 * Path: D:\OneDrive\CODING\APPS\StudyNFun\StudyNFun_Hub\countdown\countdown.css
 */

:root {
  --background: #00000F;
  --surface-light: rgba(3, 7, 18, 0.2);
  --on-surface: #e0e0e0;
  --grey: #b3c2cc;
  --primary: #40c4ff;
  --secondary: #00bcd4;
  --success: #4caf50;
  --warning: #ff9800;
  --danger: #f44336;
  --info: #2196f3;
  --honey: #fbbf24;
  --border-color: rgba(64, 196, 255, 0.2);
  --card-radius: 8px;
  --shadow: 0 4px 12px rgba(64, 196, 255, 0.075), 0 2px 6px rgba(0, 0, 0, 0.2);
  --standard-spacing: 20px;
  --container-max-width: 840px;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.6);
}

html, body {
  margin: 0; padding: 0;
  font-family: Arial, sans-serif;
  background: var(--background);
  color: var(--on-surface);
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
}

.stars, .fireflies, .fireflies-front {
  position: fixed; left: 0; top: 0;
  width: 100vw; height: 100vh;
  pointer-events: none; z-index: 0;
}
.fireflies { z-index: 1; }
.fireflies-front { z-index: 2; }

.container { min-height: 100vh; position: relative; z-index: 10; }

.navigation-wrap {
  max-width: var(--container-max-width);
  width: 100%;
  margin: var(--standard-spacing) auto;
  padding: 0 var(--standard-spacing);
  display: flex; flex-direction: column;
  gap: var(--standard-spacing);
  box-sizing: border-box;
}

.top-navigation-header, .header-wrap, .cd-panel, .footer-wrap {
  background: var(--surface-light);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-sizing: border-box;
}

.top-navigation-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--standard-spacing);
}

.top-navigation-header a:first-child {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; height: 36px; box-sizing: border-box;
  background: rgba(64, 196, 255, 0.1);
  border: 1px solid rgba(64, 196, 255, 0.3);
  border-radius: var(--card-radius);
  color: var(--primary); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: all 0.3s ease;
}
.top-navigation-header a:first-child::before {
  content: ''; width: 20px; height: 20px; flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 12L5 10M5 10L12 3L19 10M5 10V20C5 20.5523 5.44772 21 6 21H9M19 10L21 12M19 10V20C19 20.5523 18.5523 21 18 21H15M9 21C9.55228 21 10 20.5523 10 20V16C10 15.4477 10.4477 15 11 15H13C13.5523 15 14 15.4477 14 16V20C14 20.5523 14.4477 21 15 21M9 21H15' stroke='%2340c4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
.top-navigation-header a:first-child::after { content: 'Hub'; }
.top-navigation-header a:hover {
  background: rgba(64, 196, 255, 0.2); border-color: var(--primary);
}

.header-wrap {
  display: flex; justify-content: center; align-items: center;
  padding: var(--standard-spacing); min-height: 80px;
}
.logo-container {
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%;
}
.main-title { font-size: 2.2em; font-weight: 700; margin: 0; color: var(--primary); text-align: center; }
.subtitle { font-size: 1.1em; color: var(--text-muted); margin: 0; text-align: center; }

.main-content {
  display: flex; flex-direction: column; gap: var(--standard-spacing);
}

.cd-panel { padding: var(--standard-spacing); }

.cd-panel-display {
  border-left: 3px solid var(--primary);
  display: flex; justify-content: center; align-items: center;
}

.footer-wrap { padding: var(--standard-spacing); }
.footer-container { display: flex; justify-content: center; }
.copyright { color: var(--honey); font-size: 0.9em; text-align: center; }

/* ===== DISPLAY ===== */
.cd-display {
  display: flex; flex-wrap: nowrap; justify-content: center; align-items: flex-start;
  gap: 10px; width: 100%;
  padding: 18px 22px;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
  --digit: clamp(36px, 12.5vw, 100px);
  background:
    linear-gradient(180deg, rgba(64,196,255,0.07), rgba(3,7,18,0.55)),
    radial-gradient(120% 140% at 50% 0%, rgba(0,188,212,0.12), transparent 70%);
  border: 1px solid rgba(64,196,255,0.28);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 0 40px rgba(64,196,255,0.10),
    0 8px 24px rgba(0,0,0,0.45);
  animation: cdGlow 6s ease-in-out infinite;
}
@keyframes cdGlow {
  0%,100% { border-color: rgba(64,196,255,0.28); }
  50%     { border-color: rgba(156,39,176,0.35); }
}
.cd-unit { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cd-num {
  font-family: "Consolas", "Courier New", monospace;
  font-size: var(--digit); line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  background: linear-gradient(90deg,#ff5252,#ff9800,#ffc107,#4caf50,#40c4ff,#2196f3,#9c27b0,#ff5252);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(64,196,255,0.35));
  animation: cdRainbow 9s linear infinite;
}
@keyframes cdRainbow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}
.cd-lbl {
  font-size: clamp(9px, 1.4vw, 13px); letter-spacing: 2px;
  color: var(--text-muted); font-weight: 600;
}
.cd-colon {
  font-family: "Consolas", "Courier New", monospace;
  font-size: var(--digit); line-height: 1;
  color: rgba(255,255,255,0.55); font-weight: 700;
  animation: cdBlink 1s steps(1, end) infinite;
}
@keyframes cdBlink { 0%,60% { opacity: 1; } 61%,100% { opacity: 0.25; } }
.cd-unit-cs .cd-num { font-size: calc(var(--digit) * 0.55); animation-duration: 3s; }
.cd-unit-cs { align-self: flex-start; }
.cd-colon-dot { font-size: calc(var(--digit) * 0.55); animation: none; }
.cd-hidden { display: none; }
.cd-finished .cd-num {
  background: none; -webkit-text-fill-color: var(--danger); color: var(--danger);
  animation: cdFlash 0.6s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(244,67,54,0.5));
}
@keyframes cdFlash { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ===== CONTROLS ===== */
.cd-panel-ctrl {
  border-left: 3px solid var(--success);
  display: flex; flex-direction: column; gap: var(--standard-spacing);
}
.cd-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: flex-end; }
.cd-row-mode, .cd-row-btn, .cd-row-toggle, .cd-row-set {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(64,196,255,0.05), rgba(3,7,18,0.45));
  border: 1px solid rgba(64,196,255,0.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 4px 14px rgba(0,0,0,0.35);
}

.cd-mode, .cd-btn, .cd-tog {
  font-family: inherit; font-size: 14px; font-weight: 700;
  letter-spacing: 0.5px;
  padding: 12px 22px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 4px 0 rgba(0,0,0,0.35), 0 8px 16px rgba(0,0,0,0.35);
}
.cd-mode:hover, .cd-btn:hover, .cd-tog:hover {
  background: linear-gradient(180deg, rgba(64,196,255,0.24), rgba(64,196,255,0.06));
  color: var(--text-primary);
}
.cd-mode:active, .cd-btn:active, .cd-tog:active {
  transform: translateY(3px);
  box-shadow: inset 0 3px 10px rgba(0,0,0,0.55), 0 1px 0 rgba(0,0,0,0.35);
}
.cd-mode:focus-visible, .cd-btn:focus-visible, .cd-tog:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.cd-mode.active, .cd-tog.active {
  transform: translateY(2px);
  box-shadow: inset 0 3px 12px rgba(0,0,0,0.5), 0 0 18px rgba(64,196,255,0.18);
}
.cd-mode.active {
  color: var(--primary); border-color: var(--primary);
  background: linear-gradient(180deg, rgba(64,196,255,0.28), rgba(64,196,255,0.10));
}
.cd-btn-start { color: var(--success); border-color: rgba(76, 175, 80, 0.5); }
.cd-btn-start:hover { background: linear-gradient(180deg, rgba(76,175,80,0.28), rgba(76,175,80,0.06)); }
.cd-btn-start.running {
  color: var(--warning); border-color: rgba(255, 152, 0, 0.55);
  background: linear-gradient(180deg, rgba(255,152,0,0.24), rgba(255,152,0,0.06));
  animation: cdPulse 1.6s ease-in-out infinite;
}
@keyframes cdPulse {
  0%,100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 4px 0 rgba(0,0,0,0.35), 0 0 10px rgba(255,152,0,0.25); }
  50%     { box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 4px 0 rgba(0,0,0,0.35), 0 0 26px rgba(255,152,0,0.55); }
}
.cd-btn-reset { color: var(--danger); border-color: rgba(244, 67, 54, 0.45); }
.cd-btn-reset:hover { background: linear-gradient(180deg, rgba(244,67,54,0.26), rgba(244,67,54,0.06)); }
.cd-btn-full { color: var(--info); border-color: rgba(33, 150, 243, 0.45); }
.cd-btn-full:hover { background: linear-gradient(180deg, rgba(33,150,243,0.26), rgba(33,150,243,0.06)); }
.cd-tog { font-size: 13px; padding: 10px 16px; color: var(--text-muted); }
.cd-tog.active {
  color: var(--secondary); border-color: rgba(0, 188, 212, 0.55);
  background: linear-gradient(180deg, rgba(0,188,212,0.26), rgba(0,188,212,0.08));
}

.cd-field { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.cd-field-lbl {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-muted); font-weight: 700;
}
.cd-input {
  width: 92px; padding: 12px 6px; text-align: center;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 22px; font-weight: 700; letter-spacing: 1px;
  color: var(--secondary);
  background: linear-gradient(180deg, rgba(64,196,255,0.10), rgba(3,7,18,0.6));
  border: 1px solid rgba(64,196,255,0.28);
  border-radius: 10px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
  box-sizing: border-box;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  -moz-appearance: textfield;
  appearance: none;
  -webkit-appearance: none;
}
.cd-input::-webkit-outer-spin-button,
.cd-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cd-input:hover { border-color: rgba(64,196,255,0.5); }
.cd-input:focus {
  outline: none; color: var(--primary); border-color: var(--primary);
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5), 0 0 0 3px rgba(64,196,255,0.18);
}
.cd-input:disabled { opacity: 0.35; }

/* ===== RESPONSIVE ===== */
@media (min-width: 1100px) {
  :root { --container-max-width: 1100px; }
  .cd-display { --digit: clamp(72px, 9vw, 140px); gap: 16px; }
}

@media (max-width: 520px) {
  .navigation-wrap { padding: 0 12px; gap: 12px; }
  .cd-panel, .top-navigation-header, .header-wrap, .footer-wrap { padding: 12px; }
  .main-title { font-size: 1.7em; }
  .subtitle { font-size: 0.95em; }
  .cd-display { gap: 2px; --digit: clamp(22px, 10.5vw, 56px); padding: 12px 6px; }
  .cd-lbl { font-size: 8px; letter-spacing: 1px; }
  .cd-input { width: 80px; font-size: 19px; padding: 10px 4px; }
  .cd-mode, .cd-btn { flex: 1 1 40%; text-align: center; padding: 12px 10px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .navigation-wrap { margin: 8px auto; gap: 10px; }
  .top-navigation-header, .header-wrap, .footer-wrap { display: none; }
  .cd-panel { padding: 10px; }
  .main-content { gap: 10px; }
  .cd-display { --digit: clamp(34px, 18vh, 110px); }
  .cd-panel-ctrl { gap: 10px; }
  .cd-lbl { font-size: 9px; }
}

/* ===== FULLSCREEN ===== */
body.cd-fs .top-navigation-header,
body.cd-fs .header-wrap,
body.cd-fs .footer-wrap { display: none; }
body.cd-fs .cd-panel-ctrl {
  background: none; border: 0; box-shadow: none; padding: 0;
}
body.cd-fs .cd-row-btn {
  background: none; border: 0; box-shadow: none; padding: 0;
}
body.cd-fs .cd-btn { font-size: 16px; padding: 14px 30px; }
body.cd-fs .container {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100dvh;
}
body.cd-fs .navigation-wrap { max-width: min(1400px, 96vw); margin: 0 auto; }
body.cd-fs .cd-display { --digit: min(11vw, 20vh, 200px); }
body.cd-fs .cd-unit-cs .cd-num,
body.cd-fs .cd-colon-dot { font-size: calc(var(--digit) * 0.5); }
html:fullscreen, body:fullscreen { overflow: auto; background: var(--background); }

/* ===== EXTRA POLISH ===== */
.main-logo {
  display: block;
  max-width: min(315px, 100%);
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(64, 196, 255, 0.35));
}
@media (max-width: 520px) { .main-logo { max-width: 195px; } }
.main-title {
  background: linear-gradient(90deg, #40c4ff, #9c27b0, #ff9800, #4caf50, #40c4ff);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: cdRainbow 14s linear infinite;
}
.cd-panel-display { border-left-color: var(--secondary); }
.cd-panel { transition: border-color 0.3s ease; }
@media (prefers-reduced-motion: reduce) {
  .cd-num, .cd-colon, .main-title, .cd-display, .cd-btn-start.running { animation: none; }
  .cd-num { -webkit-text-fill-color: var(--primary); color: var(--primary); }
  .main-title { -webkit-text-fill-color: var(--primary); color: var(--primary); }
}

/* ===== ABOUT / SEO CONTENT ===== */
.cd-about { display: none; }
.main-title { margin: 0; width: 100%; text-align: center; }
.main-logo { margin: 0 auto; }
