/* Muay Timer – polish pass (gym-first, minimal) */

* { 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;
}

/* True center layout */
.wrap{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.card{
  width: min(900px, 100%);
  text-align: center;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #0b0b0b, #000);
}

.product-name {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.45;
  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 22px;
}

/* Button row */
.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); }

/* Make Start/Pause visually primary */
#start{
  font-size: 20px;
  font-weight: 800;
  border-color: #fff;
  min-width: 190px;
}

/* Smaller secondary buttons */
#reset, #presetFight, #fullscreen{
  color: #eaeaea;
}

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

/* Phase colour cues */

body.work #phase {
  color: #ff0000; /* red */
}

body.rest #phase {
  color: #ffb000; /* amber */
}

body.paused #phase {
  color: #9e9e9e; /* grey */
}

body.idle #phase,
body.done #phase {
  color: #ffffff;
}

/* Subtle branding */

.branding{
  margin-top: 18px;
  font-size: 12px;
  color: #6f6f6f;
  letter-spacing: 0.3px;
}

:fullscreen .branding {
  opacity: 0.6;
}

:fullscreen .product-name {
  opacity: 0.25;
}

.settings{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 18px;
}

.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;
}

#applySettings{
  min-width: 120px;
}

/* Settings toggle */

.settings-toggle {
  font-size: 12px;
  background: none;
  border: none;
  color: #777;
  cursor: pointer;
  margin-bottom: 6px;
}

.settings-toggle:hover {
  color: #aaa;
}

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

:fullscreen .settings-toggle {
  display: none;
}

/* Fullscreen icon button (top-right) */

.card{
  position: relative; /* so the icon can anchor inside */
}

.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); }

/* Draw the “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 (kept for future use) */
#presetFight {
  display: none;
}

.donate {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.5;
  text-decoration: none;
  color: inherit;
}

.donate:hover {
  opacity: 0.8;
  text-decoration: underline;
}

