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

body {
    font-family: 'Arial', sans-serif;
    background: #000000;
    min-height: 100vh;
    color: #ffffff;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    text-shadow: 2px 2px 4px rgba(255,255,255,0.1);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
    margin-bottom: 15px;
}

.temp-guide-btn {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 0.9em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.temp-guide-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Timer Display */
.timer-display {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 40px 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    border: 1px solid #333;
}

.original-time {
    font-size: 1.2em;
    color: #ccc;
    margin-bottom: 15px;
}

.added-time {
    font-size: 1em;
    color: #4CAF50;
    margin-bottom: 10px;
    font-style: italic;
}

.countdown {
    font-size: 4em;
    font-weight: bold;
    color: #fff;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Quick Timer Buttons */
.quick-timers, .custom-timer {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 1px solid #333;
}

.quick-timers h3, .custom-timer h3 {
    margin-bottom: 20px;
    color: #fff;
    font-size: 1.3em;
}

.quick-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.quick-btn {
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 10px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background: #e55a2e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

/* Custom Timer */
.custom-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.custom-inputs input {
    width: 80px;
    padding: 10px;
    border: 2px solid #555;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1em;
    background: #2a2a2a;
    color: #fff;
}

.custom-inputs input:focus {
    outline: none;
    border-color: #ff6b35;
}

.custom-inputs label {
    font-weight: bold;
    color: #ccc;
}

.custom-btn {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.custom-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Programs Section */
.programs-section {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 30px 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    border: 1px solid #333;
}

.programs-section h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #fff;
}

.programs-list {
    margin-bottom: 20px;
}

.program-item {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.program-info h4 {
    color: #fff;
    margin: 0 0 5px 0;
}

.program-info p {
    color: #ccc;
    margin: 0;
    font-size: 0.9em;
}

.program-actions {
    display: flex;
    gap: 10px;
}

.program-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.run-program {
    background: #4CAF50;
    color: white;
}

.run-program:hover {
    background: #45a049;
}

.delete-program {
    background: #f44336;
    color: white;
}

.delete-program:hover {
    background: #da190b;
}

/* Program Modal */
.program-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 20px;
    box-sizing: border-box;
}

.program-modal-content {
    background: #1a1a1a;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid #333;
}

.program-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #333;
}

.program-modal-header h2 {
    color: #fff;
    margin: 0;
}

.program-modal-body {
    padding: 25px;
}

.program-form label {
    display: block;
    color: #fff;
    margin-bottom: 5px;
    font-weight: bold;
}

.program-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    background: #2a2a2a;
    border: 2px solid #555;
    border-radius: 8px;
    color: #fff;
    box-sizing: border-box;
}

.program-form input:focus {
    outline: none;
    border-color: #ff6b35;
}

.program-form h4 {
    color: #fff;
    margin: 20px 0 15px 0;
}

.step-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.step-input input.step-minutes,
.step-input input.step-seconds {
    width: 60px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.step-input input.step-description {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.step-input span {
    color: #ccc;
    font-size: 0.9em;
}

.remove-step {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-step-btn {
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    margin-top: 10px;
}

.program-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.save-btn {
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: bold;
}

.cancel-btn {
    background: #666;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
}

/* Program Execution */
.program-execution {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 30px 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    border: 1px solid #333;
}

.program-progress {
    margin-top: 15px;
}

.program-progress #currentStep {
    font-size: 1.2em;
    color: #4CAF50;
    margin-bottom: 10px;
}

.program-progress #stepDescription {
    font-size: 1.1em;
    color: #ccc;
}

/* Timer Controls */
.timer-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.control-btn {
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-btn {
    background: #2196F3;
    color: white;
}

.add-btn:hover {
    background: #1976D2;
}

.pause-btn {
    background: #FF9800;
    color: white;
}

.pause-btn:hover {
    background: #F57C00;
}

.stop-btn {
    background: #f44336;
    color: white;
}

.stop-btn:hover {
    background: #d32f2f;
}

/* Alarm Section */
.alarm-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.alarm-message {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    margin: 20px;
    animation: pulse 1s ease-in-out infinite alternate;
    border: 2px solid #333;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.alarm-message h2 {
    font-size: 2.5em;
    color: #ff6b35;
    margin-bottom: 15px;
}

.alarm-message p {
    font-size: 1.3em;
    color: #ccc;
    margin-bottom: 25px;
}

.dismiss-btn {
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dismiss-btn:hover {
    background: #e55a2e;
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    /* Make timer larger on smaller screens for better visibility */
    .countdown {
        font-size: 4.5em;
    }
    
    .quick-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Keep custom inputs side by side on smaller screens */
    .custom-inputs {
        display: grid;
        grid-template-columns: auto auto auto auto;
        justify-content: center;
        align-items: center;
        gap: 8px;
        grid-template-areas: 
            "min-input min-label sec-input sec-label";
    }
    
    .custom-inputs input[id="minutes"] {
        grid-area: min-input;
        width: 60px;
    }
    
    .custom-inputs label[for="minutes"] {
        grid-area: min-label;
        font-size: 0.9em;
        margin-right: 10px;
    }
    
    .custom-inputs input[id="seconds"] {
        grid-area: sec-input;
        width: 60px;
    }
    
    .custom-inputs label[for="seconds"] {
        grid-area: sec-label;
        font-size: 0.9em;
    }
    
    .timer-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 200px;
    }
    
    /* Programs responsive adjustments */
    .program-item {
        flex-direction: column;
        gap: 15px;
        text-align: left;
    }
    
    .program-actions {
        width: 100%;
        justify-content: center;
    }
    
    .step-input {
        justify-content: center;
    }
    
    .step-input input.step-description {
        min-width: 150px;
    }
}

/* Timer Running State */
.timer-running .quick-timers,
.timer-running .custom-timer {
    opacity: 0.5;
    pointer-events: none;
}

.timer-running .countdown {
    color: #4CAF50;
    animation: pulse 2s ease-in-out infinite alternate;
}

/* Low Time Warning */
.low-time .countdown {
    color: #f44336 !important;
    animation: flash 1s ease-in-out infinite;
}

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

/* Temperature Modal */
.temp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 20px;
    box-sizing: border-box;
}

.temp-modal-content {
    background: #1a1a1a;
    border-radius: 15px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid #333;
}

.temp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #333;
}

.temp-modal-header h2 {
    color: #fff;
    margin: 0;
    font-size: 1.5em;
}

.close-btn {
    background: none;
    border: none;
    color: #ccc;
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #333;
    color: #fff;
}

.temp-modal-body {
    padding: 25px;
}

.temp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.temp-item {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.temp-item h3 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 1.2em;
}

.temp-item p {
    color: #4CAF50;
    margin: 5px 0;
    font-size: 1.3em;
    font-weight: bold;
}

.temp-item small {
    color: #ccc;
    font-size: 0.9em;
}

.temp-note {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.temp-note p {
    color: #fff;
    margin: 0;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Mobile responsive for temperature modal */
@media (max-width: 600px) {
    .temp-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .temp-modal-content {
        margin: 10px;
    }
    
    .temp-modal-header,
    .temp-modal-body {
        padding: 15px;
    }
    
    .temp-item {
        padding: 15px;
    }
}

/* Program Step Completion Styles */
.program-step-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.pause-program-btn {
    background: #FF9800;
}

.pause-program-btn:hover {
    background: #F57C00;
}

.continue-program-btn {
    background: #4CAF50;
}

.continue-program-btn:hover {
    background: #388E3C;
}

/* Paused Program Styles */
.paused-program {
    border: 2px solid #FF9800;
    background: rgba(255, 152, 0, 0.1);
}

.paused-program h4 {
    color: #FF9800;
}