/* Copyright (c) 2025. Jericho Crosby (Chalwk) */

:root {
    --primary: #4a6fa5;
    --secondary: #6b8cbc;
    --accent: #ff9e44;
    --light: #f5f7fa;
    --dark: #2c3e50;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: var(--primary);
    color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

h1 {
    font-size: 2.2rem;
}

.user-stats {
    display: flex;
    gap: 20px;
}

.stat {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
}

.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary);
    border-bottom: 2px solid var(--light);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input, textarea, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

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

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

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

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

.step-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.step-input .step-text {
    flex: 1;
}

.btn-remove-step {
    background-color: var(--danger);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 0;
}

.btn-remove-step:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-remove-step:not(:disabled):hover {
    background-color: #c0392b;
}

.task-item {
    background-color: white;
    border-left: 5px solid var(--primary);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.task-item:hover {
    transform: translateY(-3px);
}

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

.task-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.task-description {
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.task-priority {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.priority-high {
    background-color: var(--danger);
    color: white;
}

.priority-medium {
    background-color: var(--warning);
    color: white;
}

.priority-low {
    background-color: var(--success);
    color: white;
}

.task-steps {
    margin: 15px 0;
    background-color: var(--light);
    padding: 15px;
    border-radius: var(--border-radius);
}

.steps-title {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--primary);
    font-weight: 600;
}

.step-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px;
    background-color: white;
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
}

.step-item:hover {
    background-color: #f0f0f0;
}

.step-item.completed {
    background-color: rgba(46, 204, 113, 0.1);
}

.step-checkbox-container {
    display: flex;
    align-items: center;
    margin-right: 10px;
    cursor: pointer;
}

.step-checkbox {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.step-checkbox:checked + .checkmark {
    background-color: var(--success);
    border-color: var(--success);
}

.step-checkbox:checked + .checkmark::after {
    content: "✓";
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.step-text {
    flex: 1;
}

.step-item.completed .step-text {
    text-decoration: line-through;
    color: #888;
}

.progress-container {
    margin: 15px 0;
}

.progress-label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.progress-bar {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent);
    width: 0%;
    transition: width 0.5s ease;
}

.task-timer {
    background-color: var(--light);
    padding: 10px;
    border-radius: var(--border-radius);
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timer-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.timer-controls {
    display: flex;
    gap: 5px;
}

.task-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.timer-container {
    text-align: center;
    padding: 20px;
}

.timer-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) 0%, var(--light) 0%);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.timer-text {
    font-size: 2rem;
    font-weight: bold;
    color: var(--dark);
}

.completed-task-actions {
    margin-top: 10px;
    text-align: right;
}

#add-step {
    margin-top: 10px;
}

.btn-delete-completed {
    background-color: var(--danger);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-delete-completed:hover {
    background-color: #c0392b;
}

.templates-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.template-item {
    background-color: var(--light);
    padding: 15px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent);
    transition: transform 0.2s, box-shadow 0.2s;
}

.template-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.template-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.template-steps {
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.btn-use-template {
    background-color: var(--accent);
    padding: 5px 10px;
    font-size: 0.9rem;
    margin-top: 10px;
}

.btn-use-template:hover {
    background-color: #e68a00;
}

.achievements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.achievement {
    background-color: var(--light);
    padding: 10px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s;
}

.achievement-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.achievement.locked {
    opacity: 0.6;
}

.achievement.unlocked {
    background-color: var(--accent);
    color: white;
    transform: scale(1.05);
}

.achievement-title {
    font-size: 0.8rem;
    font-weight: 600;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}