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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.add-todo {
    padding: 20px;
    display: flex;
    gap: 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

#todoInput {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#todoInput:focus {
    outline: none;
    border-color: #4facfe;
}

button {
    padding: 12px 20px;
    background: #4facfe;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

button:hover {
    background: #3a8fd4;
}

.filters {
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.filters button {
    background: transparent;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.filters button.active {
    background: #4facfe;
    color: white;
    border-color: #4facfe;
}

.todo-list {
    max-height: 400px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.3s;
}

.todo-item:hover {
    background: #f8f9fa;
}

.todo-item.completed {
    opacity: 0.7;
}

.todo-checkbox {
    margin-right: 15px;
    transform: scale(1.2);
}

.todo-text {
    flex: 1;
    font-size: 16px;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #6c757d;
}

.todo-source {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
}

.todo-source.telegram {
    background: #0088cc;
    color: white;
}

.delete-btn {
    background: #dc3545;
    padding: 5px 10px;
    font-size: 12px;
    margin-left: 10px;
}

.delete-btn:hover {
    background: #c82333;
}

.stats {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #e9ecef;
    font-weight: bold;
}

.telegram-info {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.telegram-info h3 {
    margin-bottom: 10px;
}

.telegram-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.telegram-info code {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 15px;
    margin: 10px 20px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
}