/* pomodoro.css */

/* Mode Switcher */
.mode-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mode-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

body.light-mode .mode-btn {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
}

.mode-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.mode-btn.active {
    background: rgba(255,255,255,0.2);
    border-color: currentColor;
    color: white; /* Will be colored by JS logic dynamically or CSS overrides */
    font-weight: 700;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

/* Dynamic Mode Colors */
/* Focus = Red/Orange */
.mode-focus-style .mode-btn.active[data-mode="focus"] {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

/* Hero Section */
.pomodoro-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    margin-bottom: 2rem;
    border-radius: 24px;
    position: relative;
    transition: box-shadow 0.5s, border-color 0.5s;
    overflow: hidden;
}

/* Circular Timer */
.timer-circle-container {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.timer-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); /* Start top */
}

.track {
    fill: none;
    stroke: rgba(255,255,255,0.05);
    stroke-width: 4;
}

body.light-mode .track {
    stroke: rgba(0,0,0,0.05);
}

.progress {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 283; /* 2 * PI * 45 */
    stroke-dashoffset: 0; /* Starts full */
    transition: stroke-dashoffset 1s linear, stroke 0.5s;
}

/* Mode Specific Timer Colors */
.mode-focus-style .progress { stroke: #ff6b6b; } /* Red */
.mode-short-style .progress { stroke: #51cf66; } /* Green */
.mode-long-style .progress { stroke: #4facfe; }  /* Blue */

/* Hero Glows */
.mode-focus-style { border-color: rgba(255, 107, 107, 0.3); box-shadow: 0 0 30px rgba(255, 107, 107, 0.1); }
.mode-short-style { border-color: rgba(81, 207, 102, 0.3); box-shadow: 0 0 30px rgba(81, 207, 102, 0.1); }
.mode-long-style { border-color: rgba(79, 172, 254, 0.3); box-shadow: 0 0 30px rgba(79, 172, 254, 0.1); }

.time-display-wrapper {
    z-index: 2;
    text-align: center;
}

.main-time {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -2px;
}

.status-label {
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Controls */
.controls-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

.big-btn {
    font-size: 1.5rem;
    padding: 0.8rem 3rem;
    border-radius: 40px;
    background: var(--text-primary);
    color: var(--bg-color);
    border: none;
    font-weight: 700;
    letter-spacing: 1px;
}

.big-btn:hover {
    transform: scale(1.05);
    background: white;
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

body.light-mode .big-btn {
    background: #1e293b;
    color: white;
}

.icon-btn {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
}

/* Task Input */
.task-container {
    width: 100%;
    max-width: 400px;
}

.task-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    padding: 0.5rem;
    font-size: 1.2rem;
    color: var(--text-primary);
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.task-input:focus {
    outline: none;
    border-bottom-color: var(--text-primary);
}

.task-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
    font-style: italic;
}

/* Grid Layout */
.pomo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Stats */
.stats-panel, .settings-panel {
    padding: 1.5rem;
    border-radius: 16px;
}

.stats-panel h3, .settings-panel h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
    color: var(--text-secondary);
}

.tomatoes-container {
    min-height: 50px;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.placeholder-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.6;
}

.stat-count {
    font-size: 0.9rem;
    color: var(--text-primary);
}

#cycleCount {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* Settings */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.setting-row label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.setting-row input {
    width: 60px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    padding: 0.3rem;
    border-radius: 6px;
    text-align: center;
}

body.light-mode .setting-row input {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.1);
}

.toggles-row {
    margin-top: 1.5rem;
    display: flex;
    gap: 1.5rem;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    user-select: none;
}

.toggle-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-secondary);
    border-radius: 4px;
    position: relative;
}

.toggle-container input:checked ~ .checkmark {
    background: var(--success-color);
    border-color: var(--success-color);
}

.toggle-container input:checked ~ .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    left: 2px;
    top: -2px;
}

/* Responsive */
@media (max-width: 768px) {
    .pomo-grid { grid-template-columns: 1fr; }
    .timer-circle-container { width: 260px; height: 260px; }
    .main-time { font-size: 4rem; }
}
