/* Apple Style Black Timer - FIXED */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    user-select: none;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.timer-display {
    font-size: 5.5rem;
    font-weight: 200;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 40px 0;
    letter-spacing: -2px;
    user-select: none;
}

.buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 40px 0;
}

button {
    background: rgba(255, 149, 0, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 75px;
    height: 75px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(255, 149, 0, 0.3);
}

button:hover {
    background: rgba(255, 149, 0, 1);
    transform: scale(1.05);
}

button:active {
    transform: scale(0.95);
}

button:disabled {
    background: rgba(120, 120, 120, 0.3);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    box-shadow: none;
}

/* Start/Stop Button Colors */
.start-button {
    background: rgba(76, 175, 80, 0.9) !important; /* Green for start */
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3) !important;
}

.start-button:hover {
    background: rgba(76, 175, 80, 1) !important;
}

.start-button.stopped {
    background: rgba(244, 67, 54, 0.9) !important; /* Red for stop */
    box-shadow: 0 4px 20px rgba(244, 67, 54, 0.3) !important;
}

.start-button.stopped:hover {
    background: rgba(244, 67, 54, 1) !important;
}

#lapBtn:disabled {
    background: rgba(120, 120, 120, 0.2);
}

/* Scroll Dials */
.dial-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    height: 200px;
    overflow: hidden;
}

.dial {
    position: relative;
    width: 100px;
    height: 200px;
    overflow: hidden;
    cursor: grab;
}

.dial:active {
    cursor: grabbing;
}

.dial-label {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

.dial-numbers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.dial-number {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
}

.dial-number.active {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 400;
}

.dial-selection {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    pointer-events: none;
}

/* Laps */
#laps {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 30px;
}

.lap {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
    font-weight: 300;
}

.lap-number {
    color: rgba(255, 255, 255, 0.6);
}

.lap-time {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
}

.mode-toggle {
    margin-top: 40px;
}

.mode-toggle button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    width: auto;
    height: auto;
    padding: 12px 24px;
    font-size: 0.9rem;
}

.mode-toggle button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Alarm Alert - FIXED CENTERING */
.alarm-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.alert-content {
    background: #1a1a1a;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(255, 149, 0, 0.5);
}

.alert-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ff9500;
}

.alert-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
}

.stop-alarm-btn {
    background: #ff9500;
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    margin: 0 auto; /* Center the button */
    text-align: center;
}

.stop-alarm-btn:hover {
    background: #ffb143;
    transform: scale(1.05);
}

/* Scrollbar */
#laps::-webkit-scrollbar {
    width: 6px;
}

#laps::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#laps::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* Mobile */
@media (max-width: 480px) {
    .timer-display {
        font-size: 4rem;
    }
    
    button {
        width: 65px;
        height: 65px;
        font-size: 0.9rem;
    }
    
    .dial-container {
        gap: 10px;
    }
    
    .dial {
        width: 80px;
    }
}