:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --bg-color: #F3F4F6;
    --surface: #FFFFFF;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --danger: #EF4444;
    --danger-hover: #DC2626;
    --success: #10B981;
    --border: #E5E7EB;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Auth Pages */
.auth-container {
    background: var(--surface);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 400px;
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--primary);
    font-size: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
    font-size: 1rem;
}

.form-group input:focus {
    border-color: var(--primary);
}

.btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

.auth-link {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

.error-msg {
    background: #FEE2E2;
    color: #B91C1C;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    text-align: center;
}

/* App Container */
.app-container {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

.header {
    background: var(--primary);
    color: white;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.header p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.btn-logout {
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

.main-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

.add-form input {
    flex-grow: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}

.add-form input:focus {
    border-color: var(--primary);
}

.btn-add {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    width: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add:hover {
    background: var(--primary-hover);
}

.item-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.item:hover {
    border-color: var(--border);
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.item.completed {
    opacity: 0.7;
    background: transparent;
}

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

.check-btn {
    color: var(--text-muted);
    font-size: 1.4rem;
    margin-right: 16px;
    text-decoration: none;
    transition: color 0.2s;
}

.item.completed .check-btn {
    color: var(--success);
}

.check-btn:hover {
    color: var(--primary);
}

.item-name {
    flex-grow: 1;
    font-weight: 500;
    word-break: break-word;
}

.delete-btn {
    color: #9CA3AF;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.delete-btn:hover {
    color: var(--danger);
    background: #FEE2E2;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-size: 0.95rem;
}
