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

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --todo-color: #3b82f6;
    --inprogress-color: #f59e0b;
    --done-color: #10b981;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --priority-low: #10b981;
    --priority-medium: #f59e0b;
    --priority-high: #ef4444;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
}

[data-theme="dark"] {
    --bg-color: #1f2937;
    --card-bg: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #4b5563;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --gradient-start: #1f2937;
    --gradient-end: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    padding-bottom: 2rem;
    transition: background 0.5s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Member Routine Mode - Dynamic theme applied via JavaScript */
body.member-routine-mode {
    /* Background will be set dynamically via inline styles */
    transition: background 0.5s ease, background-image 0.5s ease;
    /* Inline style will override this */
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
}

/* Ensure inline background style takes precedence */
body.member-routine-mode[style*="background"] {
    background: var(--member-background) !important;
}

/* Welcome Screen */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeOut 0.5s ease-out 2.5s forwards;
}

.welcome-screen.hidden {
    display: none;
}

.welcome-content {
    text-align: center;
    animation: slideUp 0.8s ease-out;
}

.welcome-logo {
    margin-bottom: 2rem;
}

.welcome-app-name {
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    font-weight: 700;
    font-size: 4rem;
    letter-spacing: 3px;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: inline-block;
    animation: logoFloat 2s ease-in-out infinite;
}

.welcome-app-name .capital-d {
    text-transform: uppercase;
    font-size: 1.1em;
    color: #10b981;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.welcome-message {
    font-size: 1.5rem;
    color: white;
    font-weight: 300;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.welcome-loader {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1s forwards;
}

.loader-dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: loaderBounce 1.4s ease-in-out infinite;
}

.loader-dot:nth-child(1) {
    animation-delay: 0s;
}

.loader-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loaderBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

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

/* Navigation Bar */
.navbar {
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-name {
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: lowercase;
    position: relative;
    transition: all 0.3s ease;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.capital-d {
    text-transform: uppercase;
    font-size: 1.1em;
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.app-name:hover {
    transform: scale(1.05);
    letter-spacing: 3px;
    filter: drop-shadow(0 0 10px rgba(118, 75, 162, 0.5));
}

.app-name::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.app-name:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Minimized Pomodoro Timer */
.pomodoro-minimized {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    animation: pomodoroMinimizeIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pomodoroMinimizeIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-100%) scale(0.5);
    }
    60% {
        transform: translateX(-50%) translateY(5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.pomodoro-minimized-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4),
                0 0 0 2px rgba(16, 185, 129, 0.2);
    backdrop-filter: blur(10px);
    animation: pomodoroMinimizePulse 2s ease-in-out infinite,
               pomodoroMinimizeGlow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.pomodoro-minimized-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: pomodoroMinimizeShine 3s linear infinite;
    transform: rotate(45deg);
}

@keyframes pomodoroMinimizePulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4),
                    0 0 0 2px rgba(16, 185, 129, 0.2),
                    0 0 20px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 6px 30px rgba(16, 185, 129, 0.6),
                    0 0 0 3px rgba(16, 185, 129, 0.4),
                    0 0 40px rgba(16, 185, 129, 0.5);
    }
}

@keyframes pomodoroMinimizeGlow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(16, 185, 129, 0.8));
    }
}

@keyframes pomodoroMinimizeShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.pomodoro-minimized-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    animation: pomodoroMinimizeIconSpin 4s linear infinite;
    position: relative;
    z-index: 1;
}

.pomodoro-minimized-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pomodoroMinimizeIconRing 2s ease-in-out infinite;
}

@keyframes pomodoroMinimizeIconSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pomodoroMinimizeIconRing {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.pomodoro-minimized-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    z-index: 1;
    min-width: 80px;
}

.pomodoro-minimized-mode {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.pomodoro-minimized-time {
    font-size: 1.125rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pomodoro-minimized-progress {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.pomodoro-minimized-progress-bar {
    height: 100%;
    background: white;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: pomodoroMinimizeProgressShimmer 2s linear infinite;
    position: relative;
    overflow: hidden;
}

.pomodoro-minimized-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: pomodoroMinimizeProgressShine 1.5s linear infinite;
}

@keyframes pomodoroMinimizeProgressShimmer {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
    }
}

@keyframes pomodoroMinimizeProgressShine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.pomodoro-minimized-control,
.pomodoro-minimized-stop,
.pomodoro-minimized-expand {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.pomodoro-minimized-control:hover,
.pomodoro-minimized-expand:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pomodoro-minimized-stop {
    background: rgba(255, 255, 255, 0.25);
}

.pomodoro-minimized-stop:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.4);
}

.pomodoro-minimized-control:active,
.pomodoro-minimized-stop:active,
.pomodoro-minimized-expand:active {
    transform: scale(0.95);
}

.pomodoro-minimized-control i,
.pomodoro-minimized-stop i,
.pomodoro-minimized-expand i {
    font-size: 0.75rem;
}

/* Mode-specific colors for minimized timer */
.pomodoro-minimized.mode-break .pomodoro-minimized-content {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4),
                0 0 0 2px rgba(239, 68, 68, 0.2);
    animation: pomodoroMinimizePulseBreak 2s ease-in-out infinite,
               pomodoroMinimizeGlowBreak 3s ease-in-out infinite;
}

@keyframes pomodoroMinimizePulseBreak {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4),
                    0 0 0 2px rgba(239, 68, 68, 0.2),
                    0 0 20px rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 6px 30px rgba(239, 68, 68, 0.6),
                    0 0 0 3px rgba(239, 68, 68, 0.4),
                    0 0 40px rgba(239, 68, 68, 0.5);
    }
}

@keyframes pomodoroMinimizeGlowBreak {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.8));
    }
}

/* Hide minimized timer animation when closing */
.pomodoro-minimized.hiding {
    animation: pomodoroMinimizeOut 0.4s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
}

@keyframes pomodoroMinimizeOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-100%) scale(0.5);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pomodoro-minimized {
        left: auto;
        right: 1rem;
        transform: none;
        animation: pomodoroMinimizeInMobile 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    
    @keyframes pomodoroMinimizeInMobile {
        0% {
            opacity: 0;
            transform: translateX(100%) scale(0.5);
        }
        60% {
            transform: translateX(-5px) scale(1.05);
        }
        100% {
            opacity: 1;
            transform: translateX(0) scale(1);
        }
    }
    
    .pomodoro-minimized-content {
        padding: 0.4rem 0.75rem;
        gap: 0.5rem;
    }
    
    .pomodoro-minimized-icon {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }
    
    .pomodoro-minimized-time {
        font-size: 0.875rem;
    }
    
    .pomodoro-minimized-mode {
        font-size: 0.5rem;
    }
    
    .pomodoro-minimized-progress {
        width: 50px;
    }
    
    .pomodoro-minimized-control,
    .pomodoro-minimized-stop,
    .pomodoro-minimized-expand {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .pomodoro-minimized-control i,
    .pomodoro-minimized-stop i,
    .pomodoro-minimized-expand i {
        font-size: 0.625rem;
    }
    
    .pomodoro-minimized.hiding {
        animation: pomodoroMinimizeOutMobile 0.4s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards;
    }
    
    @keyframes pomodoroMinimizeOutMobile {
        0% {
            opacity: 1;
            transform: translateX(0) scale(1);
        }
        100% {
            opacity: 0;
            transform: translateX(100%) scale(0.5);
        }
    }
}

@media (max-width: 480px) {
    .pomodoro-minimized-info {
        min-width: 60px;
    }
    
    .pomodoro-minimized-time {
        font-size: 0.75rem;
    }
    
    .pomodoro-minimized-progress {
        width: 40px;
    }
}

/* Minimalist Toggle Switch */
.switch-container {
    position: relative;
    display: flex;
    align-items: center;
}

.switch-input {
    display: none;
}

.switch-label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 2rem;
    background: var(--bg-color);
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    padding: 0.25rem;
}

.switch-label:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.switch-input:checked + .switch-label {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.switch-slider {
    position: absolute;
    left: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-input:checked + .switch-label .switch-slider {
    transform: translateX(1.5rem);
    background: white;
}

.switch-icon {
    position: relative;
    z-index: 1;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.switch-input:checked + .switch-label .switch-icon {
    color: white;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.btn-icon:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Tooltip */
.tooltip {
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--card-bg);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.tooltip::before {
    content: '';
    position: absolute;
    top: -0.25rem;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 0.5rem;
    height: 0.5rem;
    background: var(--text-primary);
}

.btn-icon:hover .tooltip {
    opacity: 1;
    bottom: -2.75rem;
}

.switch-container:hover .tooltip {
    opacity: 1;
    bottom: -2.75rem;
}

.switch-container .tooltip {
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--card-bg);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.switch-container .tooltip::before {
    content: '';
    position: absolute;
    top: -0.25rem;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 0.5rem;
    height: 0.5rem;
    background: var(--text-primary);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Statistics Dashboard */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    animation: slideDown 0.5s ease;
}

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

.stats-card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.stats-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stats-icon.todo {
    background: linear-gradient(135deg, var(--todo-color), #2563eb);
}

.stats-icon.inprogress {
    background: linear-gradient(135deg, var(--inprogress-color), #d97706);
}

.stats-icon.done {
    background: linear-gradient(135deg, var(--done-color), #059669);
}

.stats-icon.overdue {
    background: linear-gradient(135deg, var(--priority-high), #dc2626);
}

.stats-icon.total {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.stats-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stats-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Controls Section */
.controls-section {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-clear-search {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    display: none;
    transition: all 0.2s ease;
}

.btn-clear-search.show {
    display: block;
}

.btn-clear-search:hover {
    color: var(--primary-color);
}

.filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Board Container */
.board-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Column */
.column {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    min-height: 500px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.column[data-status="todo"] {
    border-top: 4px solid var(--todo-color);
}

.column[data-status="inprogress"] {
    border-top: 4px solid var(--inprogress-color);
}

.column[data-status="done"] {
    border-top: 4px solid var(--done-color);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.column-header h2 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.task-count {
    background: var(--bg-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: normal;
}

.btn-add-task {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-add-task:hover {
    background: var(--secondary-color);
    transform: scale(1.1) rotate(90deg);
}

/* Task List */
.task-list {
    flex: 1;
    min-height: 200px;
    transition: background-color 0.2s ease;
}

.task-list.drag-over {
    background-color: rgba(99, 102, 241, 0.1);
    border-radius: 0.5rem;
    border: 2px dashed var(--primary-color);
}

/* Task Card */
.task-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: grab;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--shadow);
    animation: taskSlideIn 0.3s ease;
}

.task-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.task-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
    transform: rotate(5deg) scale(0.95);
}

.task-card.priority-low {
    border-left: 4px solid var(--priority-low);
}

.task-card.priority-medium {
    border-left: 4px solid var(--priority-medium);
}

.task-card.priority-high {
    border-left: 4px solid var(--priority-high);
}

.task-card.completed {
    opacity: 0.7;
    position: relative;
}

.task-card.completed::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border-radius: 0.5rem;
    pointer-events: none;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.task-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    flex: 1;
    margin-right: 0.5rem;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
}

.task-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.task-btn:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.task-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.task-tag {
    background: var(--bg-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.task-tag i {
    font-size: 0.625rem;
    cursor: pointer;
    opacity: 0.7;
}

.task-tag i:hover {
    opacity: 1;
    color: var(--priority-high);
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.task-priority {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    text-transform: capitalize;
}

.task-priority.low {
    background: rgba(16, 185, 129, 0.1);
    color: var(--priority-low);
}

.task-priority.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--priority-medium);
}

.task-priority.high {
    background: rgba(239, 68, 68, 0.1);
    color: var(--priority-high);
}

.task-due-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.task-due-date.overdue {
    color: var(--priority-high);
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Timer Display */
.task-timer-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--inprogress-color);
}

.task-timer-container i {
    color: var(--inprogress-color);
    font-size: 1rem;
    animation: timerPulse 2s infinite;
}

@keyframes timerPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.task-timer {
    font-weight: 600;
    color: var(--inprogress-color);
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.task-total-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--done-color);
}

.task-total-time i {
    color: var(--done-color);
    font-size: 0.875rem;
}

.task-total-time span {
    font-weight: 500;
    color: var(--done-color);
    font-size: 0.875rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.toast.success {
    border-left-color: var(--done-color);
}

.toast.error {
    border-left-color: var(--priority-high);
}

.toast.warning {
    border-left-color: var(--inprogress-color);
}

.toast.info {
    border-left-color: var(--todo-color);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    margin-left: auto;
}

.toast-close:hover {
    color: var(--text-primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--card-bg);
    border-radius: 0.75rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-content.modal-large {
    max-width: 700px;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: var(--bg-color);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.required {
    color: var(--priority-high);
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
}

/* Tag Input */
.tag-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    min-height: 3rem;
    background: var(--bg-color);
}

.tag-item {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: tagSlideIn 0.2s ease;
}

@keyframes tagSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tag-item .tag-remove {
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0.8;
}

.tag-item .tag-remove:hover {
    opacity: 1;
}

/* Statistics Modal */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.priority-breakdown {
    margin-top: 2rem;
}

.priority-breakdown h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.priority-bars {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.priority-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.priority-label {
    min-width: 80px;
    font-weight: 500;
    text-transform: capitalize;
    color: var(--text-primary);
}

.bar-container {
    flex: 1;
    height: 1.5rem;
    background: var(--bg-color);
    border-radius: 0.25rem;
    overflow: hidden;
}

.bar {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 0.25rem;
}

.bar.high {
    background: linear-gradient(90deg, var(--priority-high), #dc2626);
}

.bar.medium {
    background: linear-gradient(90deg, var(--priority-medium), #d97706);
}

.bar.low {
    background: linear-gradient(90deg, var(--priority-low), #059669);
}

.priority-count {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
}

/* Shortcuts */
.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    background: var(--bg-color);
    border-radius: 0.25rem;
}

kbd {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-family: monospace;
    font-size: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 2rem;
    text-align: center;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Animation for task addition */
@keyframes taskSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-card.new-task {
    animation: taskSlideIn 0.3s ease;
}

/* Completion Animation */
@keyframes completeTask {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.task-card.completing {
    animation: completeTask 0.5s ease;
}

/* Minimalist View */
body.minimalist-view .navbar {
    background: transparent;
    box-shadow: none;
    padding: 0.5rem 0;
}

body.minimalist-view .nav-container {
    justify-content: space-between;
}

body.minimalist-view .nav-actions {
    display: flex;
}

body.minimalist-view .btn-icon {
    display: none;
}

body.minimalist-view .switch-container {
    display: flex;
}

body.minimalist-view .nav-title {
    font-size: 1rem;
}

body.minimalist-view .container {
    padding: 0;
    margin: 0;
}

body.minimalist-view .stats-dashboard,
body.minimalist-view .controls-section {
    display: none !important;
}

body.minimalist-view .board-container {
    margin-top: 0;
    gap: 1rem;
    padding: 1rem;
    grid-template-columns: repeat(3, 1fr);
    min-height: calc(100vh - 60px);
}

body.minimalist-view .column {
    box-shadow: none;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 0.5rem;
}

body.minimalist-view .column-header {
    padding: 1rem;
    margin-bottom: 1rem;
}

body.minimalist-view .column-header h2 {
    font-size: 1rem;
}

body.minimalist-view .toast-container {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-app-name {
        font-size: 2.5rem;
    }

    .welcome-message {
        font-size: 1.2rem;
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .nav-title {
        font-size: 1.25rem;
    }

    .container {
        padding: 0 1rem;
    }

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

    .board-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .column {
        min-height: 300px;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

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

    .filter-group {
        width: 100%;
    }

    .toast-container {
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nav-title {
        font-size: 1rem;
    }

    .stats-dashboard {
        grid-template-columns: 1fr;
    }

    .column-header h2 {
        font-size: 1rem;
    }

    .task-card {
        padding: 0.75rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pomodoro Timer Styles */
.pomodoro-modal {
    max-width: 600px;
}

.pomodoro-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Preset Buttons */
.pomodoro-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
}

.pomodoro-preset-btn {
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.pomodoro-preset-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.pomodoro-preset-btn:hover::before {
    left: 100%;
}

.pomodoro-preset-btn:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.pomodoro-preset-btn.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
}

.pomodoro-preset-btn i {
    font-size: 2.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.pomodoro-preset-btn:hover i {
    transform: scale(1.2) rotate(5deg);
}

.pomodoro-preset-btn.active i {
    animation: presetIconPulse 2s ease-in-out infinite;
}

.preset-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.preset-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

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

/* Timer Container */
.pomodoro-timer-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: timerFadeIn 0.5s ease;
}

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

/* Mode Indicator */
.pomodoro-mode-indicator {
    margin-bottom: 0.5rem;
}

.mode-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    animation: modeBadgePulse 2s ease-in-out infinite;
}

.pomodoro-timer-container.mode-work .mode-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.pomodoro-timer-container.mode-break .mode-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

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

/* Circular Timer */
.pomodoro-circle-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
}

.pomodoro-circle {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.pomodoro-circle-bg {
    fill: none;
    stroke: var(--bg-color);
    stroke-width: 12;
}

.pomodoro-circle-progress {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 879.65;
    stroke-dashoffset: 879.65;
    transition: stroke-dashoffset 0.1s linear, stroke 0.3s ease;
    transform-origin: center;
}

.pomodoro-timer-container.mode-work .pomodoro-circle-progress {
    stroke: #10b981;
}

.pomodoro-timer-container.mode-break .pomodoro-circle-progress {
    stroke: #ef4444;
}

.pomodoro-timer-container.running .pomodoro-circle-wrapper {
    animation: pomodoroPulse 2s ease-in-out infinite;
}

@keyframes pomodoroPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3));
    }
    50% {
        transform: scale(1.02);
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5));
    }
}

.pomodoro-timer-container.mode-work.running .pomodoro-circle-wrapper {
    animation: pomodoroPulseWork 2s ease-in-out infinite;
}

.pomodoro-timer-container.mode-break.running .pomodoro-circle-wrapper {
    animation: pomodoroPulseBreak 2s ease-in-out infinite;
}

@keyframes pomodoroPulseWork {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.3));
    }
    50% {
        transform: scale(1.02);
        filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.5));
    }
}

@keyframes pomodoroPulseBreak {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.3));
    }
    50% {
        transform: scale(1.02);
        filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.5));
    }
}

/* Time Display */
.pomodoro-time-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.pomodoro-time {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    transition: all 0.3s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.pomodoro-timer-container.mode-work .pomodoro-time {
    color: #10b981;
}

.pomodoro-timer-container.mode-break .pomodoro-time {
    color: #ef4444;
}

.pomodoro-mode-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* Completion Animation */
.pomodoro-timer-container.complete {
    animation: timerComplete 0.6s ease;
}

@keyframes timerComplete {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(0.95);
    }
    75% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Mode Transition */
.pomodoro-timer-container.mode-transitioning {
    animation: modeTransition 0.5s ease;
}

@keyframes modeTransition {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Controls */
.pomodoro-controls {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

.btn-pomodoro {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    min-width: 140px;
    justify-content: center;
}

.btn-pomodoro:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-pomodoro i {
    font-size: 1rem;
}

.btn-pomodoro-secondary {
    background: var(--bg-color);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: none;
}

.btn-pomodoro-secondary:hover {
    background: var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-pomodoro-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-pomodoro-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

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

/* Hide presets when timer is active */
.pomodoro-body:has(.pomodoro-timer-container:not([style*="display: none"])) .pomodoro-presets {
    display: none;
}

/* Responsive Design for Pomodoro */
@media (max-width: 768px) {
    .pomodoro-modal {
        max-width: 95%;
    }

    .pomodoro-body {
        padding: 1.5rem;
    }

    .pomodoro-presets {
        grid-template-columns: 1fr;
    }

    .pomodoro-circle-wrapper {
        width: 250px;
        height: 250px;
    }

    .pomodoro-time {
        font-size: 2.5rem;
    }

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

    .btn-pomodoro {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .pomodoro-circle-wrapper {
        width: 200px;
        height: 200px;
    }

    .pomodoro-time {
        font-size: 2rem;
    }

    .preset-title {
        font-size: 1.5rem;
    }

    .pomodoro-preset-btn {
        padding: 1rem;
    }
}

/* Routine Styles */
.routine-modal {
    max-width: 700px;
}

.routine-body {
    padding: 1.5rem;
}

.routine-actions {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.members-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    max-height: 60vh;
    overflow-y: auto;
}

.member-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow);
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.member-card.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
}

.member-card-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.member-card-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.member-card-routines {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.member-card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.member-card-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.member-card-btn:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.member-card-btn.delete:hover {
    color: var(--priority-high);
}

/* Routines Input */
.routines-input-container {
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    background: var(--bg-color);
    min-height: 200px;
}

.routines-list {
    margin-bottom: 1rem;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
}

.routine-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.routine-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.routine-item-name {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.routine-item-remove {
    background: transparent;
    border: none;
    color: var(--priority-high);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.routine-item-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.add-routine-input {
    display: flex;
    gap: 0.5rem;
}

.add-routine-input input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--card-bg);
    color: var(--text-primary);
}

.add-routine-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Current Member Indicator */
.current-member-indicator {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.current-member-indicator i {
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .members-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .member-card {
        padding: 1rem;
    }
    
    .member-card-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }
    
    .add-routine-input {
        flex-direction: column;
    }
}
