body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 15px;
    transition: 0.3s;
}

/* THEMES */
body.dark {
    background: #0f1117;
    color: #e6e6e6;
}

body.light {
    background: #f4f6fb;
    color: #111;
}

/* TITLE */
h1 {
    text-align: center;
    margin-bottom: 15px;
}

/* TOP BAR */
.top-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 25px;
}

.top-bar input,
.top-bar button {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px;
    border: none;
}

/* BUTTON COLORS */
.top-bar button {
    cursor: pointer;
    font-weight: 600;
}

/* Buttons order */
.top-bar button:nth-child(3) { background: #3b82f6; color: white; } /* Set Attack */
.top-bar button:nth-child(4) { background: #ef4444; color: white; } /* Reset */
.top-bar button:nth-child(5) { background: #10b981; color: white; } /* Add Player */
.top-bar button:nth-child(6) { background: #8b5cf6; color: white; } /* Theme */

/* ✅ LOGIN BUTTON (NEW STYLE) */
.top-bar button:nth-child(7) {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
}

/* UTC CLOCK */
#utcClock {
    font-weight: bold;
    padding: 10px 14px;
    border-radius: 8px;
    background: #111827;
    color: #22c55e;
    font-family: monospace;
}

body.light #utcClock {
    background: #e5e7eb;
    color: #111;
}

/* GRID */
.players-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
    justify-content: center;
    gap: 25px;
}

/* CARD */
.player-card {
    position: relative;
    border-radius: 14px;
    padding: 16px;
    width: 100%;
    max-width: 340px;
}

/* CARD THEMES */
body.dark .player-card {
    background: linear-gradient(145deg, #1b1f2a, #151821);
    border: 1px solid #2a2f3a;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

body.light .player-card {
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ORDER BADGE */
.order-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    font-weight: bold;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 12px;
}

/* MOVE BUTTONS */
.move-controls {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}

.move-btn {
    flex: 1;
    padding: 6px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: #374151;
    color: white;
}

.move-btn:hover {
    background: #4b5563;
}

/* INPUTS */
.player-card input,
.player-card select {
    width: 100%;
    margin-bottom: 8px;
    padding: 9px;
    border-radius: 6px;
    font-size: 14px;
}

/* Disabled inputs */
.player-card input:disabled,
.player-card select:disabled {
    opacity: 1;
    cursor: not-allowed;
}

body.dark .player-card input:disabled,
body.dark .player-card select:disabled {
    background: #1f2937;
    color: #e5e7eb;
    border: 1px solid #374151;
}

body.light .player-card input:disabled,
body.light .player-card select:disabled {
    background: #f3f4f6;
    color: #111;
}

/* SUMMARY */
.summary {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 8px;
}

/* COUNTDOWN */
.countdown {
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    margin-top: 12px;
}

/* ✅ NEW: HIT TIME DISPLAY */
.hit-time {
    font-size: 13px;
    text-align: center;
    margin-top: 6px;
    font-family: monospace;
    opacity: 0.85;
}

/* Dark mode */
body.dark .hit-time {
    color: #60a5fa; /* soft blue */
}

/* Light mode */
body.light .hit-time {
    color: #2563eb;
}

/* DELETE */
.delete-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 9px;
    border-radius: 8px;
    width: 100%;
    margin-top: 10px;
}

/* NEXT PLAYER */
.next-player {
    outline: 3px solid #facc15;
    animation: pulseNext 1.2s infinite;
}

@keyframes pulseNext {
    0% { box-shadow: 0 0 10px rgba(250,204,21,0.4); }
    50% { box-shadow: 0 0 20px rgba(250,204,21,0.8); }
    100% { box-shadow: 0 0 10px rgba(250,204,21,0.4); }
}

/* FLASH */
.flash {
    animation: flashSend 0.4s;
}

@keyframes flashSend {
    0% { background: #00ff88; }
    100% { }
}

#authStatus {
    font-weight: bold;
    padding: 10px 14px;
    border-radius: 8px;
}

.auth-logged-in {
    background: #065f46;
    color: #34d399;
}

.auth-logged-out {
    background: #3f3f46;
    color: #a1a1aa;
}

/* INLINE DELETE BUTTON */
.delete-inline {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
}

.delete-inline:hover {
    background: #dc2626;
}

.pets-time {
    font-size: 12px;
    text-align: center;
    margin-top: 4px;
    font-family: monospace;
    color: #f59e0b;
}

/* ===== HEADER ROW (SAFE) ===== */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

/* Player name (keeps your existing look) */
.player-name {
    font-weight: 600;
    font-size: 14px;
}

/* Inline hit time (small + subtle) */
.hit-time-inline {
    font-size: 11px;
    font-family: monospace;
    opacity: 0.7;
}

/* ===== FIELD LABELS (SAFE, minimal spacing) ===== */
.field-label {
    font-size: 11px;
    margin: 4px 0 2px 0;
    display: block;
    opacity: 0.6;
}

/* ===== PETS ROW (non-intrusive) ===== */
.pets-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-top: 6px;
}

/* Smaller checkbox WITHOUT breaking layout */
.pets-row input[type="checkbox"] {
    transform: scale(0.85);
    margin: 0;
    cursor: pointer;
}

.card-top {
    margin-bottom: 8px;
}

.hit-time-line,
.pets-time-line {
    font-size: 12px;
    font-family: monospace;
    opacity: 0.8;
}

#players .player-card div[id^="hit-"],
#players .player-card div[id^="pets-"] {
    font-size: 0.85em;      /* match label feel */
    opacity: 0.8;           /* optional: softer like labels */
    margin-top: 2px;
}

.card-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.card-top .countdown {
    font-size: 0.9em;
    font-weight: normal;
}

.card-top .countdown {
    font-size: 0.9em;
    font-weight: normal;
}


#players .player-card select[id^="hero"] {
    width: auto !important;
    min-width: 0;
    flex: 1;
}

.heroes-row {
    display: flex;
    gap: 6px;
}

.heroes-row select {
    flex: 1;
    width: auto;
}

.pets-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}

* {
    box-sizing: border-box;
}