/* ============================================
   TASK MANAGER - MODERN CSS STYLES
   ============================================ */

/* CSS Variables for easy customization */
:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Container */
.container {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 100%;
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Main Content */
main {
    padding: 30px;
}

/* Add Task Section */
.add-task-section {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

#taskInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

#taskInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

#taskInput::placeholder {
    color: var(--text-light);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-danger {
    background: var(--danger-color);
    color: white;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Statistics */
.stats {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

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

/* Task List */
.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    transition: var(--transition);
    animation: slideIn 0.3s ease;
}

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

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

.task-item.completed {
    background: var(--bg-light);
    opacity: 0.7;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

.task-text {
    flex: 1;
    font-size: 1rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-light);
}

.delete-btn {
    opacity: 0;
    transition: var(--transition);
}

.task-item:hover .delete-btn {
    opacity: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: var(--bg-light);
    padding: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
}

.version {
    margin-top: 5px;
    font-weight: 600;
}

#appVersion {
    color: var(--primary-color);
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        border-radius: 0;
        min-height: 100vh;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .add-task-section {
        flex-direction: column;
    }

    .stats {
        flex-direction: column;
        gap: 10px;
    }

    .stat-item {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
    }

    .stat-label,
    .stat-value {
        display: inline;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .add-task-section,
    .delete-btn,
    footer {
        display: none;
    }

    .container {
        box-shadow: none;
    }
}