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

:root {
    --bg: #0b1020;
    --bg-elev: #121a2f;
    --card: #0f1629;
    --card-2: #121b33;
    --text: #e6e9f2;
    --text-muted: #a8b0c3;
    --primary: #7c9cff;
    --primary-600: #648aff;
    --primary-700: #5177ff;
    --success: #22c55e;
    --success-700: #16a34a;
    --danger: #ef4444;
    --danger-700: #dc2626;
    --border: rgba(255,255,255,0.08);
    --ring: rgba(124,156,255,0.35);
    --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f6f7fb;
        --bg-elev: #ffffff;
        --card: #ffffff;
        --card-2: #fafbff;
        --text: #0b1220;
        --text-muted: #5b6477;
        --primary: #4f46e5;
        --primary-600: #4338ca;
        --primary-700: #3730a3;
        --success: #16a34a;
        --success-700: #15803d;
        --danger: #dc2626;
        --danger-700: #b91c1c;
        --border: rgba(2,6,23,0.08);
        --ring: rgba(79,70,229,0.25);
        --shadow: 0 10px 30px rgba(2,6,23,0.08);
    }
}

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(1200px 600px at 10% 0%, rgba(124,156,255,0.10) 0%, rgba(124,156,255,0.00) 60%),
                radial-gradient(1200px 600px at 90% 0%, rgba(124,156,255,0.10) 0%, rgba(124,156,255,0.00) 60%),
                var(--bg);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

header {
    margin-bottom: 40px;
    padding-top: 40px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-text {
    text-align: center;
}

header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
}

.date-display {
    text-align: center;
    margin-bottom: 30px;
}

#current-date {
    background: var(--card);
    color: var(--text);
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 500;
    border: 1px solid var(--border);
    font-size: 0.95rem;
    min-height: 20px;
    display: inline-block;
    min-width: 220px;
    text-align: center;
    box-shadow: var(--shadow);
}

.task-card {
    background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.task-card:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--ring), var(--shadow);
}

.task-card.is-highlighted {
    box-shadow: 0 0 0 3px var(--ring), 0 10px 30px rgba(124,156,255,0.25);
}

.task-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 200px at 0% 0%, rgba(124,156,255,0.08) 0%, rgba(124,156,255,0) 60%),
                radial-gradient(600px 200px at 100% 0%, rgba(124,156,255,0.08) 0%, rgba(124,156,255,0) 60%);
    pointer-events: none;
}

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

.task-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.task-number {
    background: rgba(124,156,255,0.12);
    border: 1px solid var(--ring);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
}

.task-content {
    margin-bottom: 25px;
}

#current-task {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.6;
    text-align: center;
    padding: 16px 18px;
    background: var(--bg-elev);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 15px;
}

/* removed decorative quotes for cleaner look */

/* Completion Section - Outside Card */
.completion-section {
    margin-bottom: 30px;
    text-align: center;
}

.completion-status {
    background: var(--card);
    padding: 18px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: inline-block;
    min-width: 300px;
    border: 1px solid var(--border);
}

.completion-status p {
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.completion-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-complete {
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-size: 0.9rem;
    border: 1px solid transparent;
    min-width: 120px;
}

.btn-complete:hover {
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 6px 16px rgba(34,197,94,0.25);
}

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

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 6px 16px rgba(239,68,68,0.25);
}

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

.btn-complete.completed,
.btn-complete:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-complete:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-random {
    background: var(--primary);
    color: white;
    border: 1px solid transparent;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-size: 0.95rem;
    margin: 0 auto;
    display: block;
    box-shadow: 0 8px 24px rgba(124,156,255,0.3);
}

.btn-random:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
}

.task-actions {
    display: flex;
    justify-content: center;
    position: relative;
}

.menu-options {
    display: none;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.menu-options.show {
    display: flex;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--ring);
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: rgba(124,156,255,0.12);
    color: var(--text);
    transform: translateY(-1px);
}

.stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 40px;
}

.stat-item {
    background: var(--card);
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    flex: 1;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Settings Button */
.settings-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.settings-button {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
    box-shadow: var(--shadow);
    z-index: 1000;
    position: relative;
}

.settings-button:hover {
    background: var(--card-2);
    transform: translateY(-1px);
}

.settings-icon {
    font-size: 1.1rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.settings-button:hover .settings-icon {
    opacity: 1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2,6,23,0.6);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: var(--card);
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.settings-modal {
    max-width: 600px;
    max-height: 90vh;
}

.modal-header {
    background: linear-gradient(180deg, var(--card-2), var(--card));
    color: var(--text);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-weight: 700;
    margin: 0;
    font-size: 1.1rem;
}

.close {
    color: var(--text);
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 16px 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.history-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

.history-task {
    color: var(--text);
    flex: 1;
    margin-left: 15px;
}

.history-status {
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 100px;
    text-align: right;
    color: var(--text-muted);
}

/* Settings Styles */
.settings-section {
    margin-bottom: 30px;
}

.settings-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.settings-info {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-style: italic;
}

.add-task-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#new-task-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: var(--bg-elev);
    color: var(--text);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

#new-task-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring);
}

.btn-add {
    background: var(--success);
    color: white;
    border: 1px solid transparent;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
    white-space: nowrap;
}

.btn-add:hover {
    background: var(--success-700);
    transform: translateY(-1px);
}

.task-list, .default-task-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background: var(--bg-elev);
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.task-item:last-child {
    border-bottom: none;
}

.task-item:hover {
    background-color: rgba(124,156,255,0.06);
}

.task-text {
    flex: 1;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.btn-delete {
    background: var(--danger);
    color: white;
    border: 1px solid transparent;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
    margin-left: 10px;
}

.btn-delete:hover {
    background: var(--danger-700);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .task-card {
        padding: 18px;
    }
    
    #current-task {
        font-size: 1.05rem;
        padding: 14px;
    }
    
    .task-actions {
        flex-direction: column;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .settings-container {
        bottom: 15px;
        right: 15px;
    }
    
    .settings-button {
        width: 48px;
        height: 48px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-card {
    animation: fadeIn 0.5s ease-out;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.notification-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.notification-status {
    font-size: 0.9rem;
    color: #666;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.notification-status span {
    font-weight: 600;
}

#enable-notifications, #disable-notifications {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

#enable-notifications:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

#disable-notifications {
    background: #6c757d;
}

#disable-notifications:hover {
    background: #5a6268;
    transform: translateY(-1px);
}
