/* General Styling & Variables */
:root {
    --primary-color: #4f46e5;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --background-color: #f3f4f6;
    --text-color: #1f2937;
    --card-background: #ffffff;
    --border-color: #e5e7eb;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin: 0;
}

header p {
    color: #6b7280;
    margin-top: 5px;
}

/* Card styling */
.card {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Forms */
form h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background-color: #4338ca;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}
.btn-secondary:hover {
    background-color: #059669;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}
.btn-danger:hover {
    background-color: #dc2626;
}

/* Tabs for Login/Register */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-link {
    flex: 1;
    padding: 10px;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* App-specific styles */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.app-header p {
    margin: 0;
    font-size: 0.9rem;
}
.app-header span {
    font-weight: bold;
    color: var(--primary-color);
}
.app-header .btn {
    width: auto;
    padding: 8px 16px;
}

#add-todo-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#add-todo-form input {
    flex-grow: 1;
}

#add-todo-form .btn {
    width: auto;
}

/* To-Do List */
#todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#todo-list li {
    display: flex;
    align-items: center;
    padding: 12px 5px;
    border-bottom: 1px solid var(--border-color);
}

#todo-list li:last-child {
    border-bottom: none;
}

#todo-list li.completed span {
    text-decoration: line-through;
    color: #9ca3af;
}

#todo-list li span {
    flex-grow: 1;
    cursor: pointer;
}

#todo-list li button {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

#todo-list li:hover button {
    opacity: 1;
}
