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

:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --border-color: #444;
    --accent-color: #4a9eff;
    --accent-hover: #3a7ed8;
    --success-color: #4caf50;
    --success-hover: #45a049;
    --danger-color: #f44336;
}

body.light-mode {
    --bg-primary: #f5f5f5;
    --bg-secondary: white;
    --bg-tertiary: #f8f9fa;
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #ddd;
    --accent-color: #007bff;
    --accent-hover: #0056b3;
    --success-color: #28a745;
    --success-hover: #1e7e34;
    --danger-color: #dc3545;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

#theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
}

#theme-toggle:hover {
    background: var(--accent-color);
}

.user-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-section input {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    width: 120px;
    min-width: 100px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.user-section button {
    padding: 8px 12px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.user-section button:hover {
    background: var(--accent-hover);
}

@media (max-width: 600px) {
    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .user-section {
        justify-content: center;
    }
}

h1 {
    color: var(--text-primary);
    margin: 0;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
}

.tab-btn:hover {
    background: var(--accent-hover);
    color: white;
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

input, select, button {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
}

input, select {
    flex: 1;
    min-width: 150px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

button {
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    border: none;
}

button:hover {
    background: var(--accent-hover);
}

.chore-item, .history-item {
    background: var(--bg-tertiary);
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    border-left: 4px solid var(--accent-color);
}

.chore-actions {
    margin-top: 10px;
}

.complete-btn {
    background: var(--success-color);
    padding: 5px 15px;
    font-size: 12px;
}

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

.chore-meta {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 5px;
}

#kid-name {
    width: 100%;
    margin-bottom: 20px;
}
