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

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 16px;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    color: #fff;
    user-select: none;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.container.focus-mode {
    max-width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding: 0;
    justify-content: center;
    align-items: center;
}

.motto {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    opacity: 0.7;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.container.hide-ui .motto {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
    letter-spacing: 0.02em;
    opacity: 1;
}

.timer-display {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 9rem;
    font-weight: 600;
    margin: 2rem 0;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: #fff;
    transition: font-size 0.6s cubic-bezier(0.4, 0, 0.2, 1), margin 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}

.timer-display:not(.celebration-pulse) {
    transition: font-size 0.6s cubic-bezier(0.4, 0, 0.2, 1), margin 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timer-display:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.container.focus-mode .timer-display {
    font-size: 14rem;
    margin: 0;
}

.timer-edit {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 9rem;
    font-weight: 600;
    margin: 2rem 0;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.container.focus-mode .timer-edit {
    font-size: 14rem;
    margin: 0;
}

.timer-edit.active {
    display: flex;
}

.timer-edit.active ~ .timer-display {
    display: none;
}

.timer-input-inline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 9rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: center;
    width: 200px;
    padding: 0.5rem;
    transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

.timer-input-inline::-webkit-outer-spin-button,
.timer-input-inline::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.container.focus-mode .timer-input-inline {
    font-size: 14rem;
    width: 300px;
}

.timer-input-inline:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.02);
}

.timer-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.timer-button-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
}

.timer-btn-inc-dec {
    width: 50px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    line-height: 1;
}

.container.focus-mode .timer-btn-inc-dec {
    width: 65px;
    height: 50px;
    font-size: 2rem;
}

.timer-btn-inc-dec:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.timer-btn-inc-dec:active {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(0) scale(0.95);
}

.timer-separator {
    font-size: 9rem;
    font-weight: 600;
}

.container.focus-mode .timer-separator {
    font-size: 14rem;
}

.controls,
.status {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.container.hide-ui .controls,
.container.hide-ui .status,
.container.hide-ui .timer-edit {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

.btn {
    padding: 0.875rem 2rem;
    font-size: 24px;
    font-weight: 400;
    font-family: 'Space Grotesk', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: lowercase;
    letter-spacing: 0.02em;
    background: transparent;
}

.btn-primary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.btn-primary:active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0) scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.status {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin-top: 2rem;
    opacity: 0.6;
    text-transform: lowercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }

    .timer-display {
        font-size: 7rem;
    }

    .container.focus-mode .timer-display {
        font-size: 9.5rem;
    }

    .timer-edit {
        font-size: 7rem;
    }

    .container.focus-mode .timer-edit {
        font-size: 9.5rem;
    }

    .timer-input-inline {
        font-size: 7rem;
        width: 150px;
    }

    .container.focus-mode .timer-input-inline {
        font-size: 9.5rem;
        width: 200px;
    }

    .timer-separator {
        font-size: 7rem;
    }

    .container.focus-mode .timer-separator {
        font-size: 9.5rem;
    }

    .timer-btn-inc-dec {
        width: 45px;
        height: 35px;
        font-size: 1.25rem;
    }

    .container.focus-mode .timer-btn-inc-dec {
        width: 55px;
        height: 42px;
        font-size: 1.75rem;
    }

    .motto {
        font-size: 1.2rem;
    }

    .btn {
        padding: 0.875rem 2rem;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .timer-display {
        font-size: 6rem;
    }

    .container.focus-mode .timer-display {
        font-size: 8rem;
    }

    .timer-edit {
        font-size: 6rem;
    }

    .container.focus-mode .timer-edit {
        font-size: 8rem;
    }

    .timer-input-inline {
        font-size: 6rem;
        width: 120px;
    }

    .container.focus-mode .timer-input-inline {
        font-size: 8rem;
        width: 150px;
    }

    .timer-separator {
        font-size: 6rem;
    }

    .container.focus-mode .timer-separator {
        font-size: 8rem;
    }

    .timer-btn-inc-dec {
        width: 40px;
        height: 30px;
        font-size: 1.1rem;
    }

    .container.focus-mode .timer-btn-inc-dec {
        width: 50px;
        height: 38px;
        font-size: 1.5rem;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Celebration Confetti Canvas */
#confetti {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    pointer-events: none;
    z-index: 9999;
}

.celebration-pulse {
    animation: celebrationPulse 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform-origin: center center;
}

@keyframes celebrationPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

