@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Orbitron:wght@400;700&display=swap');

:root {
    --bg-color: #0a0a0a;
    --neon-blue: #00FFFF;
    --neon-purple: #8A2BE2;
    --neon-green: #39FF14;
    --neon-pink: #FF00FF;
    --text-primary: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    padding: 1rem;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('logo_transp.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1;
}

.timer-display {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(5rem, 25vw, 15rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transition: color 0.3s ease, text-shadow 0.3s ease;
    width: 100%;
    display: flex;
    justify-content: center;
}

.clock-display {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.4rem, 6.2vw, 4.8rem); /* +20% from previous size */
    color: var(--text-primary);
    opacity: 0.7;
    cursor: pointer;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    z-index: 100;
}
.clock-display:hover {
    opacity: 1;
    color: var(--neon-blue);
    text-shadow: 0 0 15px var(--neon-blue);
}
body.clock-mode .clock-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16vw; /* Reduced to safely fit 8 characters of HH:MM:SS */
    max-width: 100%;
    width: 100vw;
    color: var(--neon-blue);
    text-shadow: 0 0 40px var(--neon-blue);
    text-align: center;
    margin: 0;
    opacity: 1;
    box-sizing: border-box;
    padding: 0 20px;
    white-space: nowrap; /* Prevent line wrapping */
}
body.clock-mode .container > div:not(#clockDisplay) {
    display: none !important;
}

.phase-label {
    font-size: clamp(1.2rem, 5vw, 2rem);
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.phase-label.fight {
    color: var(--neon-green);
}

.phase-label.rest {
    color: var(--neon-blue);
}

.controls {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

button {
    background: transparent;
    border: 2px solid var(--neon-purple);
    color: var(--neon-purple);
    padding: 0.8rem 2rem;
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.2);
}

button:hover {
    background: var(--neon-purple);
    color: white;
    box-shadow: 0 0 30px var(--neon-purple);
    transform: translateY(-5px);
}

button:active {
    transform: translateY(0);
}

#fullscreenBtn {
    padding: 0.8rem 1.2rem;
    font-size: 2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.config-panel {
    margin-top: 3rem;
    background: var(--glass-bg);
    padding: 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 600px;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.config-group h3 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    opacity: 0.8;
}

.inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem;
    width: 60px;
    font-size: 1.2rem;
    text-align: center;
    border-radius: 8px;
}

input:focus {
    outline: none;
    border-color: var(--neon-purple);
    box-shadow: 0 0 10px var(--neon-purple);
}

span {
    font-size: 1.2rem;
}

/* Fix for Fullscreen visibility and centering */
:fullscreen body {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
    .config-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 1rem;
    }
}