/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    overflow-x: hidden;
    overflow-y: auto;
    user-select: none;
}

/* Main Container */
.main-container {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.main-container:hover {
    background-color: #222222;
}

/* Timer Display */
.timer-display {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.time-text {
    font-size: 15vw;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-variant-numeric: tabular-nums;
}

.time-text.warning {
    color: #ff6b6b;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
}

.time-text.critical {
    color: #ff4757;
    text-shadow: 0 0 40px rgba(255, 71, 87, 0.7);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Target Info */
.target-info {
    display: flex;
    gap: 40px;
    font-size: 1.2rem;
    color: #cccccc;
    align-items: center;
}

.current-time, .target-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.current-time::before {
    content: "Current Time";
    font-size: 0.8rem;
    color: #888888;
}

.target-time::before {
    content: "Target Time";
    font-size: 0.8rem;
    color: #888888;
}

/* Controls */
.controls {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10;
}

.control-btn {
    padding: 12px 24px;
    border: 2px solid #4ecdc4;
    background: rgba(78, 205, 196, 0.1);
    color: #4ecdc4;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(78, 205, 196, 0.2);
    transform: translateY(-2px);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn.danger {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.control-btn.danger:hover {
    background: rgba(255, 107, 107, 0.2);
}

/* Initial Message */
.initial-message {
    text-align: center;
    animation: fadeInOut 3s infinite;
}

.initial-message p {
    font-size: 1.5rem;
    color: #888888;
    letter-spacing: 0.05em;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .time-text {
        font-size: 20vw;
    }
    
    .target-info {
        flex-direction: column;
        gap: 20px;
        font-size: 1rem;
    }
    
    .controls {
        bottom: 20px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 20px;
    }
    
    .control-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .time-text {
        font-size: 25vw;
    }
    
    .initial-message p {
        font-size: 1.2rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .time-text {
        color: #ffffff;
        text-shadow: none;
    }
    
    .control-btn {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.control-btn:focus {
    outline: 2px solid #4ecdc4;
    outline-offset: 2px;
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}