@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4C84FF;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background-color: #f5f5f5;
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #e0e0e0;
}

* {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 80%;
}

body {
    background: var(--background-color);
    padding: 4rem 2rem;
}

.container {
    max-width: 100rem;
    margin: 0 auto;
}

h1 {
    font-size: 3rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
    text-align: center;
}

/* Timer Card */
.timer-card {
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    margin-bottom: 3rem;
}

.timer-header {
    text-align: center;
    margin-bottom: 3rem;
}

.timer-header h2 {
    font-size: 2.4rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.timer-description {
    font-size: 1.6rem;
    color: var(--text-secondary);
}

/* Countdown Display */
.countdown-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.countdown-display.small {
    gap: 1rem;
    margin-bottom: 2rem;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.time-value {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 12rem;
    text-align: center;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: pulse 2s ease-in-out infinite;
}

.countdown-display.small .time-value {
    font-size: 4rem;
    min-width: 8rem;
    padding: 1.5rem;
}

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

.time-label {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-display.small .time-label {
    font-size: 1.2rem;
}

.time-separator {
    font-size: 5rem;
    font-weight: 700;
    color: var(--text-secondary);
    opacity: 0.5;
    animation: blink 1s ease-in-out infinite;
}

.countdown-display.small .time-separator {
    font-size: 3rem;
}

@keyframes blink {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.1;
    }
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 1rem;
    background: #e0e0e0;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 3rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.5rem;
    transition: width 0.5s ease;
    width: 100%;
}

/* Custom Inputs */
.custom-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.input-group label {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

.input-group input {
    padding: 1.2rem;
    font-size: 1.6rem;
    border: 2px solid var(--border-color);
    border-radius: 0.8rem;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 132, 255, 0.1);
}

/* Timer Controls */
.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2.5rem;
    font-size: 1.6rem;
    font-weight: 600;
    border: none;
    border-radius: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #3b72e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 132, 255, 0.4);
}

.btn-success {
    background: var(--success-color);
    color: #fff;
}

.btn-success:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: var(--warning-color);
    color: #fff;
}

.btn-warning:hover:not(:disabled) {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* Expired Message */
.expired-message {
    display: none;
    text-align: center;
    padding: 4rem;
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 3rem;
}

.expired-message.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.expired-icon {
    font-size: 8rem;
    color: var(--success-color);
    margin-bottom: 2rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.expired-message h2 {
    font-size: 2.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.expired-message p {
    font-size: 1.6rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    html {
        font-size: 70%;
    }

    .countdown-display {
        gap: 1rem;
    }

    .time-value {
        font-size: 4rem;
        min-width: 8rem;
        padding: 1.5rem;
    }

    .time-separator {
        font-size: 3rem;
    }

    .custom-inputs {
        grid-template-columns: repeat(2, 1fr);
    }

    .timer-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
