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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
    background: #000;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.score {
    position: fixed;
    top: 40px;
    right: 40px;
    font-size: 72px;
    font-weight: 900;
    color: #fff;
    z-index: 100;
}

.screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 60px;
    padding: 40px;
}

.hidden {
    display: none !important;
}

.prompt {
    font-size: 48px;
    font-weight: 300;
    text-align: center;
    line-height: 1.4;
    max-width: 900px;
}

.habit-title {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 72px;
    font-weight: 900;
    color: #fff;
    z-index: 100;
}

.giant-input {
    background: transparent;
    border: none;
    border-bottom: 4px solid #fff;
    color: #fff;
    font-size: 72px;
    font-weight: 700;
    text-align: center;
    width: 80%;
    max-width: 800px;
    padding: 20px 0;
    outline: none;
}

.giant-input::placeholder {
    color: #444;
}

.time-inputs {
    display: flex;
    gap: 80px;
    align-items: center;
}

.time-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.time-input {
    background: transparent;
    border: 4px solid #fff;
    color: #fff;
    font-size: 96px;
    font-weight: 700;
    text-align: center;
    width: 180px;
    height: 180px;
    outline: none;
}

.time-group label {
    font-size: 32px;
    font-weight: 300;
    text-transform: lowercase;
}

.next-button {
    background: transparent;
    border: 4px solid #fff;
    color: #fff;
    font-size: 72px;
    width: 120px;
    height: 120px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next-button:hover {
    background: #fff;
    color: #000;
}

.red-button {
    background: #ff0000;
    border: none;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 15px 30px rgba(255, 0, 0, 0.3),
                0 10px 20px rgba(0, 0, 0, 0.5),
                inset 0 -8px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    position: relative;
}

.red-button:hover:not(:disabled) {
    background: #ff1111;
    transform: translateY(-2px);
    box-shadow: 0 18px 35px rgba(255, 0, 0, 0.35),
                0 12px 25px rgba(0, 0, 0, 0.5),
                inset 0 -8px 15px rgba(0, 0, 0, 0.2);
}

.red-button:active:not(:disabled) {
    background: #cc0000;
    transform: translateY(4px);
    box-shadow: 0 4px 8px rgba(255, 0, 0, 0.2),
                0 2px 4px rgba(0, 0, 0, 0.3),
                inset 0 4px 8px rgba(0, 0, 0, 0.3);
}

.red-button:disabled {
    background: #333;
    cursor: not-allowed;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3),
                inset 0 -2px 5px rgba(0, 0, 0, 0.2);
}

.timer-message {
    font-size: 42px;
    font-weight: 300;
    text-align: center;
    line-height: 1.6;
}

#waitTime, #doTime {
    font-weight: 700;
    font-size: 54px;
}

#habitPreview, #habitDisplay {
    font-weight: 700;
}

.reset-button {
    position: fixed;
    bottom: 40px;
    left: 40px;
    background: transparent;
    border: 3px solid #666;
    color: #666;
    font-size: 48px;
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset-button:hover {
    border-color: #fff;
    color: #fff;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Responsive Design */
@media (max-width: 768px) {
    .score {
        font-size: 48px;
        top: 20px;
        right: 20px;
    }

    .habit-title {
        font-size: 48px;
        top: 20px;
    }

    .prompt {
        font-size: 32px;
    }

    .giant-input {
        font-size: 48px;
        width: 90%;
    }

    .time-inputs {
        gap: 30px;
    }

    .time-input {
        font-size: 64px;
        width: 100px;
        height: 100px;
    }

    .time-group label {
        font-size: 20px;
    }

    .next-button {
        font-size: 48px;
        width: 80px;
        height: 80px;
    }

    .red-button {
        width: 200px;
        height: 200px;
    }

    .timer-message {
        font-size: 28px;
    }

    #waitTime, #doTime {
        font-size: 36px;
    }

    .reset-button {
        font-size: 32px;
        width: 60px;
        height: 60px;
        bottom: 20px;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .score {
        font-size: 36px;
    }

    .habit-title {
        font-size: 36px;
        max-width: 60%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .prompt {
        font-size: 24px;
        padding: 0 20px;
    }

    .giant-input {
        font-size: 36px;
    }

    .time-inputs {
        flex-direction: column;
        gap: 20px;
    }

    .time-input {
        font-size: 48px;
        width: 80px;
        height: 80px;
    }

    .time-group label {
        font-size: 18px;
    }

    .red-button {
        width: 150px;
        height: 150px;
    }

    .timer-message {
        font-size: 22px;
    }

    #waitTime, #doTime {
        font-size: 28px;
    }

    .screen {
        gap: 40px;
    }
}