:root {
  --page-bg: #000000;          /* SAYFA ARKA PLAN - tam siyah */
  --clock-bg: #2b2b2b;         /* SAYACIN ÜST PANEL RENGİ - koyu gri */
  --clock-bg-bottom: #1a1a1a;  /* SAYACIN ALT PANEL RENGİ - daha koyu gri */
  --digit-color: #ffffff;      /* Üst panel yazı */
  --digit-color-bottom: #ffffff;  /* Alt panel yazı */
}

/* GLOBAL */

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--page-bg);
  font-family: Arial, sans-serif;
  color: #fff;
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;   /* logo + sayaç dikey ortalı */
  align-items: center;       /* yatay ortalı */
  position: relative;
  overflow: hidden;
}

/* ---------------- LOGO UPLOAD (SETUP EKRANI) ---------------- */

.logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.logo-preview {
  width: 720px;
  height: 210px;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  border: 1px solid #333;
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-preview.placeholder span {
  font-size: 0.75rem;
  color: #555;
  letter-spacing: 0.08em;
}

.logo-input {
  width: 240px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #050505;
  color: #ddd;
  font-size: 0.7rem;
  outline: none;
}

.logo-input::file-selector-button {
  background: #222;
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
}

/* ---------------- LOGO (COUNTDOWN EKRANI) ---------------- */

.logo-display {
  margin-bottom: 4vh; /* logo ile sayaç arası */
}

.logo-display img {
  width: 576px;
  height: 168px;
  object-fit: contain;
}

/* ---------------- COLOR PANEL ---------------- */

.colors-panel {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.color-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 0.75rem;
  color: #ddd;
}

.color-field input[type='color'] {
  width: 52px;
  height: 28px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid #444;
  background: #111;
  cursor: pointer;
}

/* ---------------- SETUP: SÜRE GİRİŞİ ---------------- */

.setup {
  text-align: center;
}

.setup-label {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ddd;
  margin-bottom: 10px;
}

.setup-inputs {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 10px;
}

.time-input {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: #ddd;
}

.time-input span {
  text-align: left;
  padding-left: 2px;
}

.time-input input {
  width: 80px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #444;
  outline: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  background: #111;
  color: #fff;
}

.time-input input:focus {
  border-color: #fff;
}

/* BUTTON */

.btn {
  min-width: 90px;
  padding: 7px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.18s ease-out;
}

.btn.primary {
  background: #ffffff;
  color: #000;
}

.btn:hover:enabled {
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.6);
  background: #fff;
  color: #000;
}

.error {
  margin-top: 4px;
  font-size: 0.7rem;
  color: #ff5252;
}

/* ---------------- FLIP CLOCK ---------------- */

.flip-clock {
  text-align: center;
  perspective: 900px;
  margin: 0 auto;
  margin-bottom: 2vh; /* altta az boşluk */
}

.flip-clock *,
.flip-clock *::before,
.flip-clock *::after {
  box-sizing: border-box;
}

.flip-clock__piece {
  display: inline-block;
  margin: 0 1.2vw;
}

@media (min-width: 1200px) {
  .flip-clock__piece {
    margin: 0 20px;
  }
}

.flip-clock__slot {
  font-size: 0.8rem;
  line-height: 1.5;
  display: block;
  color: #b0b3c4;
  margin-top: 8px;
}

/* Kart genel boyutu */

.flip-card {
  display: block;
  position: relative;
  padding-bottom: 0.72em;
  font-size: clamp(4.5rem, 11vw, 8.5rem); /* boyut büyüdü */
  line-height: 0.95;
}

/* ---------------- PANEL YARIMLARI ---------------- */

.flip-card__top,
.flip-card__bottom,
.flip-card__back-bottom,
.flip-card__back::before,
.flip-card__back::after {
  display: block;
  height: 0.72em;
  width: 1.9em;
  padding: 0.18em 0.25em 0.3em;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

/* TOP (ön panel) + BACK TOP */

.flip-card__top,
.flip-card__back::before {
  color: var(--digit-color);
  background: var(--clock-bg);
  border-radius: 0.22em 0.22em 0 0;
  text-align: center;
}

/* BOTTOM (ön panel) + BACK BOTTOM */

.flip-card__bottom,
.flip-card__back-bottom {
  color: var(--digit-color-bottom);
  position: absolute;
  top: 50%;
  left: 0;
  background: var(--clock-bg-bottom);
  border-radius: 0 0 0.22em 0.22em;
  border-top: 1px solid rgba(0, 0, 0, 0.5); /* ortadaki çizgi */
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.flip-card__back-bottom {
  z-index: 1;
}

.flip-card__bottom::after,
.flip-card__back-bottom::after {
  display: block;
  margin-top: -0.72em;
}

/* Değerler */

.flip-card__back::before,
.flip-card__bottom::after,
.flip-card__back-bottom::after {
  content: attr(data-value);
}

/* BACK layer */

.flip-card__back {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  pointer-events: none;
}

.flip-card__back::before {
  position: relative;
  overflow: hidden;
  z-index: -1;
}

/* ---------------- FLIP ANİMASYONU ---------------- */

.flip-card.flip .flip-card__back::before {
  z-index: 3;
  animation: flipTop 0.3s cubic-bezier(.37,.01,.94,.35);
  animation-fill-mode: both;
  transform-origin: center bottom;
}

.flip-card.flip .flip-card__bottom {
  transform-origin: center top;
  animation: flipBottom 0.6s cubic-bezier(.15,.45,.28,1);
  animation-fill-mode: both;
}

/* ÜST PANEL */

@keyframes flipTop {
  0% { transform: rotateX(0deg); z-index: 4; opacity: 1; }
  99% { opacity: 1; }
  100% { transform: rotateX(-90deg); opacity: 0; }
}

/* ALT PANEL */

@keyframes flipBottom {
  0%,50% { z-index: -1; transform: rotateX(90deg); opacity: 0; }
  51% { opacity: 1; }
  100% { opacity: 1; transform: rotateX(0deg); z-index: 5; }
}

/* ---------------- HAMBURGER MENÜ ---------------- */

.hamburger {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 28px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(0,0,0,0.6);
  border-radius: 8px;
  border: 1px solid #444;
  cursor: pointer;
  z-index: 20;
}

.hamburger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

/* Menü paneli */

.menu-panel {
  position: absolute;
  top: 60px;
  right: 16px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.9);
  border-radius: 10px;
  border: 1px solid #444;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 25;
}

.menu-item {
  padding: 6px 10px;
  font-size: 0.65rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #111;
  color: #fff;
  text-align: left;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-item:hover {
  background: #fff;
  color: #000;
}
