/* Pomodoro Timer Specific Styles */

.pomodoro-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 30px;
}

.pomodoro-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-purple), var(--purple-lighter));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

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

.timer-circle {
    position: relative;
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}

.progress-ring-circle {
    fill: none;
    stroke: var(--primary-purple);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.5s ease;
}

.timer-text {
    font-size: clamp(2.5rem, 10vw, 50px);
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    line-height: 1;
}

.timer-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

.control-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover:not(:disabled) {
    border-color: var(--primary-purple);
    background: rgba(147, 51, 234, 0.1);
    transform: translateY(-2px);
}

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

.control-btn svg {
    width: 20px;
    height: 20px;
}

/* Preset Section */
.presets-section,
.custom-time-section {
    width: 100%;
    max-width: 500px;
}

.section-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px 10px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-btn:hover {
    border-color: var(--purple-light);
    transform: translateY(-2px);
}

.preset-btn.active {
    border-color: var(--primary-purple);
    background: rgba(147, 51, 234, 0.15);
}

.preset-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.preset-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Custom Time Input */
.custom-time-input {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input {
    width: 100px;
    padding: 12px 15px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-purple);
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

.set-custom-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-purple), var(--purple-light));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.set-custom-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(147, 51, 234, 0.4);
}

/* Session Counter */
.session-counter {
    padding: 15px 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.session-counter p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.session-counter span {
    font-weight: 700;
    color: var(--primary-purple);
}

/* Responsive Design */
@media (max-width: 768px) {
    .timer-circle {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 600px) {
    .pomodoro-title {
        font-size: 1.8rem;
    }

    .timer-circle {
        width: 180px;
        height: 180px;
    }

    .timer-text {
        font-size: clamp(1.8rem, 6vw, 3rem);
    }

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

    .custom-time-input {
        flex-direction: column;
        align-items: center;
    }

    .input-group input {
        width: 120px;
    }
}

/* Animation for timer running */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(147, 51, 234, 0);
    }
}

.timer-circle.running .progress-ring-circle {
    animation: pulse 2s infinite;
}

/* Theme Toggle */
.btn-container {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.theme-toggle {
    flex-shrink: 0;
    margin-right: 25px;
    margin-top: 5px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
}

/* LIGHT MODE FIX: Theme Toggle */
[data-theme="light"] .theme-toggle {
    background: var(--card-bg);
    border-color: var(--border-color);
}
[data-theme="light"] .theme-toggle svg {
    stroke: var(--primary-purple);
    fill: var(--primary-purple);
}

[data-theme="dark"] .theme-toggle svg {
    stroke: var(--purple-lighter);
    fill: none;
}

.theme-toggle:hover {
    border-color: var(--primary-purple);
    transform: rotate(15deg) scale(1.05);
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 25px;
    margin-top: 25px;
    margin-bottom: -40px;
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.back-btn button {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.back-btn button a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.back-btn button span {
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-btn button img {
    width: 20px;
    height: 20px;
    display: block;
}

.back-btn:hover {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
    transform: translateX(-3px) scale(1.05);
}

[data-theme="light"] .back-btn {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="light"] .back-btn:hover {
    color: var(--primary-purple);
    border-color: var(--primary-purple);
}

[data-theme="dark"] .back-btn-icon {
    filter:invert(1);
}

/* Background Video Styling */
.background-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Ensure body and html take full height */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Ensure all main content is above the background */
body {
    position: relative;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 1;
}

/* Optional: Add a dark overlay for better text readability */
.background-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* Adjust opacity as needed */
    z-index: 0;
    pointer-events: none;
}

[data-theme="light"] .background-video {
    filter:brightness(1.5) saturate(0.3) opacity(0.7);
}