/* Countdown Timer Styles - Using Global Variables */
:root {
    --bg: #0f0f17;
    --surface: #161622;
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --border: #2d2d3d;
    --radius: 16px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

.light-mode {
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --primary: #6366f1;
    --primary-light: #818cf8;
    --border: #e2e8f0;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* Timer Container */
.timer-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.timer-wrapper {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid var(--border);
}

.timer-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--text);
}

.timer-heart {
    font-size: 2rem;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: inherit;
}

.timer-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Timer Card */
.timer-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border);
}

/* Timer Display */
.timer-display {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.timer-circle {
    position: relative;
    width: 280px;
    height: 280px;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    stroke: var(--border);
}

.progress-ring-fill {
    stroke: var(--primary);
    transition: stroke-dashoffset 0.1s linear;
}

.timer-time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
    width: 100%;
}

.timer-label {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.875rem;
    color: var(--text-light);
    white-space: nowrap;
}

/* Time Input Section */
.time-input-section {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.time-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
}

.timer-input {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg);
    color: var(--text);
    transition: all 0.3s;
}

.timer-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Preset Buttons */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.preset-btn {
    padding: 0.5rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
}

.preset-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Control Buttons */
.control-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.control-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s;
}

.start-btn {
    background: var(--success);
    color: white;
}

.start-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

.pause-btn {
    background: var(--warning);
    color: white;
}

.pause-btn:hover:not(:disabled) {
    background: #d97706;
    transform: translateY(-2px);
}

.pause-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.reset-btn {
    background: var(--danger);
    color: white;
}

.reset-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Alarm Stop Container */
.alarm-stop-container {
    text-align: center;
    margin: 1rem 0;
    animation: pulse 1s infinite;
    scroll-margin-top: 20px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.stop-alarm-btn {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    transition: all 0.3s;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.stop-alarm-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.alarm-warning {
    margin-top: 0.5rem;
    color: var(--danger);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Action Buttons */
.timer-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.timer-action-btn {
    padding: 0.5rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text);
}

.timer-action-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Status Message */
.status-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.875rem;
}

.status-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Timer Info Section */
.timer-info {
    margin-top: 2rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border);
}

.timer-info h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 1rem 0;
    color: var(--primary);
}

.timer-info h3:first-child {
    margin-top: 0;
}

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.note-box {
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.faq-item {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-md);
}

.faq-item h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.faq-item p {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Related Resources */
.imagesplit-related {
    margin-top: 2rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border);
}

.imagesplit-related h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.related-category h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.related-category ul {
    list-style: none;
    padding-left: 0;
}

.related-category li {
    margin: 0.5rem 0;
}

.related-category a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.875rem;
}

.related-category a:hover {
    color: var(--primary);
}

.related-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 640px) {
    .timer-wrapper {
        padding: 1rem;
    }
    
    .timer-card {
        padding: 1rem;
    }
    
    .timer-time {
        font-size: 2rem;
    }
    
    .timer-circle {
        width: 220px;
        height: 220px;
    }
    
    .preset-buttons {
        gap: 0.25rem;
    }
    
    .preset-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .control-buttons {
        flex-direction: column;
    }
    
    .rating-header {
        flex-direction: column;
        align-items: flex-start;
    }
}