/* MoiTimer – stable layout (normal = card, fullscreen = edge-to-edge) */

* { box-sizing: border-box; }

:root{
  --bg: #000;
  --fg: #fff;
  --muted: #bdbdbd;
  --panel: #0f0f0f;
  --border: #2a2a2a;
}

body{
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* Normal mode: centered card */
.wrap{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.card{
  position: relative;
  width: min(900px, 100%);
  text-align: center;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: radial-gradient(circle at center, #141414 0%, #000 65%);
}

/* Header */
.product-name{
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* Phase label */
#phase{
  font-size: clamp(42px, 6vw, 70px);
  font-weight: 900;
  letter-spacing: 2px;
  margin: 0 0 10px;
}

/* Main timer */
#time{
  font-size: clamp(96px, 14vw, 190px);
  font-weight: 950;
  line-height: 1;
  margin: 0 0 12px;
}

/* Round info */
#round{
  font-size: clamp(18px, 2.4vw, 28px);
  color: var(--muted);
  margin: 0 0 16px;
}

/* Settings toggle */
.settings-toggle{
  font-size: 12px;
  background: none;
  border: none;
  color: #777;
  cursor: pointer;
  margin: 0 0 10px;
}
.settings-toggle:hover{ color: #aaa; }

/* Settings panel */
.settings {
  margin: 14px 0 20px;
  display: grid;
  gap: 12px;
  justify-content: center;
}

.settings-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.settings-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.settings label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #9a9a9a;
  text-align: left;
}

.settings input {
  width: 110px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background: #0f0f0f;
  color: #fff;
  font-size: 16px;
}


/* Make settings buttons sit on their own line (no HTML changes needed) */
.settings > button{
  flex: 0 0 auto;
  margin-top: 6px;
}
.settings > button#defaultPreset,
.settings > button#applySettings{
  /* force new row */
  display: inline-flex;
}
.settings > button#defaultPreset{
  margin-left: 0;
}
.settings > button#applySettings{
  margin-left: 0;
}

/* Hide / show */
.hidden{ display: none; }

/* Controls */
.controls{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

button{
  font-size: 18px;
  padding: 14px 18px;
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  min-width: 160px;
}
button:hover{ background: #161616; }
button:active{ transform: translateY(1px); }

#start{
  font-size: 20px;
  font-weight: 800;
  border-color: #fff;
  min-width: 190px;
}

#reset, #presetFight, #fullscreen{ color: #eaeaea; }

/* Fullscreen icon button (top-right) */
.icon-btn{
  position: absolute;
  top: 16px;
  right: 16px;
  width: 52px;
  height: 52px;
  min-width: 0;
  padding: 0;
  border-radius: 14px;
  background: #111;
  border: 1px solid #2a2a2a;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-btn:hover{ background: #171717; }
.icon-btn:active{ transform: translateY(1px); }

/* Four corners icon */
.fs-icon{
  width: 22px;
  height: 22px;
  position: relative;
}
.fs-icon::before,
.fs-icon::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#fff,#fff) left top/10px 2px no-repeat,
    linear-gradient(#fff,#fff) left top/2px 10px no-repeat,

    linear-gradient(#fff,#fff) right top/10px 2px no-repeat,
    linear-gradient(#fff,#fff) right top/2px 10px no-repeat,

    linear-gradient(#fff,#fff) left bottom/10px 2px no-repeat,
    linear-gradient(#fff,#fff) left bottom/2px 10px no-repeat,

    linear-gradient(#fff,#fff) right bottom/10px 2px no-repeat,
    linear-gradient(#fff,#fff) right bottom/2px 10px no-repeat;
  opacity: 0.95;
}

/* Hide Traditional Fight preset (still usable via reset logic) */
#presetFight{ display: none; }

/* Branding + donate */
.branding{
  margin-top: 18px;
  font-size: 12px;
  color: #6f6f6f;
  letter-spacing: 0.3px;
}
.support-copy {
  max-width: 32ch;
  margin: 1rem auto .65rem;
  color: #ccc;
  font-size: .875rem;
  line-height: 1.5;
}
.support-copy strong {
  color: #fff;
}
.donate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .5rem .9rem;
  border: 1px solid #999;
  border-radius: .65rem;
  background: #171717;
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}
.donate:hover,
.donate:focus-visible {
  border-color: #fff;
  background: #292929;
}
.donate:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Phase colours */
body.work #phase { color: #ff0000; }
body.rest #phase { color: #ffb000; }
body.paused #phase { color: #9e9e9e; }
body.idle #phase,
body.done #phase { color: #ffffff; }

/* Mobile */
@media (max-width: 520px){
  button{ min-width: 140px; width: 100%; }
  .card{ padding: 22px; }
}

/* =========================
   FULLSCREEN MODE OVERRIDES
   (stretch + BIG timer)
   ========================= */
:fullscreen .wrap{
  padding: 0;
  width: 100vw;
  height: 100vh;
  place-items: stretch;
}

:fullscreen .card{
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
  border: none;
  padding: 0;
  display: grid;
  place-items: center;
}

/* Keep everything centered in fullscreen without changing normal layout */
:fullscreen .card > *{
  justify-self: center;
}

/* Bigger text only in fullscreen */
:fullscreen #phase{
  font-size: clamp(70px, 8vw, 120px);
  margin: 0 0 12px;
}
:fullscreen #time{
  font-size: clamp(220px, 22vw, 520px);
  line-height: 0.95;
  margin: 0 0 14px;
}
:fullscreen #round{
  font-size: clamp(26px, 3vw, 44px);
  margin: 0 0 26px;
}

/* Hide settings toggle in fullscreen (optional) */
:fullscreen .settings-toggle{
  display: none;
}

h1.product-name {
  margin-top: 0;
  color: #ff0000;
  font: 400 clamp(2.5rem, 8vw, 4.5rem)/1 "Germania One", Georgia, serif;
  letter-spacing: -.02em;
  text-transform: none;
}
