/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

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

/* Main content */
main {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Sections */
.auth-section,
.form-section,
.status-section,
.preview-section {
    margin-bottom: 2rem;
}

.auth-section {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.form-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

input[type="text"],
input[type="date"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Status messages */
.status-section {
    min-height: 50px;
}

.status-message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-loading {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Todo preview */
.preview-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

#todo-list {
    list-style: none;
}

#todo-list li {
    background: white;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

#todo-list li.todo-created {
    background: #f0f9ff;
    border-left-color: #22c55e;
    opacity: 0.9;
}

.todo-title {
    font-weight: 600;
    color: #495057;
}

.todo-date {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Utility classes */
.hidden {
    display: none;
}

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

/* Footer */
footer {
    text-align: center;
    color: white;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    header h2 {
        font-size: 1.5rem;
    }

    main {
        padding: 1.5rem;
    }
}