

:root {
    --bg-color: #eceef1; /* Light blue-grey */
    --text-color: #2d3748;
    --button-bg: #dde4ec;
    --button-hover: #cbd5e0;
    --highlight-color: #85888d;
    --border-color: #cbd5e0;
    
    /* Theme toggle variables */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.digital-timer {
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    margin: 20px auto;
    color: var(--text-color);
    width: 100%;
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --bg-color: #1e293b; /* Darker background for better contrast */
    --text-color: #f8fafc; /* Brighter text for better readability */
    --button-bg: #475569; /* Better button contrast */
    --button-hover: #64748b; /* Improved hover state */
    --highlight-color: #cbd5e1; /* Better highlight visibility */
    --border-color: #475569;
    
    /* Dark mode shadows */
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

/* Add subtle gradient to dark mode background */
[data-theme="dark"] body {
    background: linear-gradient(145deg, #1e293b, #334155);
    color: var(--text-color);
}

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

html {
    scroll-behavior: smooth;
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    width: 100%;
}

.timer-container {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    margin: 0 auto 2rem auto;
    background-color: var(--bg-color);
}

.timer-type {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.timer-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.5em;
    font-weight: bold;
    z-index: 2;
}

#timerCanvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.task-section {
    margin: 20px 0;
    padding: 20px;
    background-color: var(--bg-color);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.task-header h3 {
    margin: 0;
}

#taskInputContainer {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#taskInput {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--text-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background-color: var(--button-bg);
    border-radius: 4px;
    transition: background-color 0.3s;
}

.task-item:hover {
    background-color: var(--button-hover);
}

.task-item.completed {
    text-decoration: line-through;
    opacity: 0.7;
}

.task-item.active {
    border: 2px solid var(--highlight-color);
    background-color: var(--highlight-color);
    color: var(--bg-color);
}

.task-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.task-text {
    flex: 1;
}

.pomodoro-count {
    font-size: 0.9em;
    opacity: 0.8;
}

.task-actions {
    display: flex;
    gap: 5px;
}

.task-actions button {
    padding: 5px 8px;
    font-size: 0.8em;
    min-width: auto;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

button {
    font-size: 1em;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: var(--button-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: var(--button-hover);
}

#themeToggle {
    margin-top: 20px;
}

.settings {
    margin: 20px 0;
}

.settings-panel {
    background-color: var(--bg-color);
    border: 1px solid var(--text-color);
    border-radius: 5px;
    padding: 15px;
    margin-top: 10px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.setting-item input {
    width: 60px;
    padding: 5px;
    border-radius: 3px;
    border: 1px solid var(--text-color);
    background-color: var(--bg-color);
    color: var(--text-color);
}

.hidden {
    display: none;
}

.stats {
    margin: 20px 0;
    padding: 20px;
    border-top: 1px solid var(--text-color);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-header h3 {
    margin: 0;
}

#statsView {
    padding: 5px;
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--text-color);
}

.stats-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background-color: var(--button-bg);
    border-radius: 8px;
}

.stat-label {
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.2em;
    font-weight: bold;
}

#statsChart {
    width: 100%;
    height: 150px;
    margin-top: 20px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--primary-gradient);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    margin: 20px auto;
}

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

.theme-toggle:active {
    transform: translateY(0);
}

.theme-icon {
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: scale(1.1);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .nav-container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .app-header {
        padding: 2rem 1rem;
        margin: 0 1rem 2rem 1rem;
    }
    
    .app-header h1 {
        font-size: 2.5rem;
    }
    
    .app-header p {
        font-size: 1rem;
    }
    
    .header-icon {
        font-size: 2.5rem;
    }
    
    .timer-container {
        padding: 1rem;
        margin: 0 1rem;
    }
    
    .timer {
        font-size: 3em;
    }
    
    .button-container {
        flex-direction: column;
    }
    
    button {
        width: 100%;
        margin: 5px 0;
    }
}

/* Top Navigation */
.top-nav {
    background: var(--primary-gradient);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    width: 100%;
    position: relative;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-home {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-home:hover {
    opacity: 0.9;
}

.nav-icon {
    font-size: 1.5rem;
}

.nav-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.6);
}

.current-tool {
    font-weight: 500;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* App Header */
.app-header {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa726 50%, #667eea 100%);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.app-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 1;
}

.app-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.app-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.app-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.header-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.header-icon {
    font-size: 3rem;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

.header-icon:nth-child(2) {
    animation-delay: 1.5s;
}

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

/* App Footer */
.app-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    opacity: 0.8;
}
