* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #facc15;       /* HLAVNÁ ŽLTÁ */
    --accent: #fde047;              /* SVETLEJŠIA ŽLTÁ */
    --bg-color: #121212;            /* HLAVNÝ TMAVÝ PODKLAD */
    --card-bg: #1e1e1e;             /* UHLÁ SIVÁ */
    --text-color: #f5f5f5;          /* SVETLÁ SIVÁ */
    --text-secondary: #a3a3a3;      /* DRUHÁ SIVÁ */
    --border-light: rgba(255, 255, 255, 0.08);
}

:root.red-theme {
    --primary-color: #ef4444;
    --accent: #f87171;
}

:root.green-theme {
    --primary-color: #22c55e;
    --accent: #4ade80;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    padding: 2rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-weight: 700;
}

/*pridavanie*/
.add-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
}

.row-1 input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: #1f1f1f;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.25s ease;
    margin-bottom: 1rem;
}

.row-1 input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #262626;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.2);
}

input::placeholder {
    color: #ffffff;
}
    
.row-2 {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 1rem;
}

.row-2 select {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: #1f1f1f; 
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.25s ease;
    cursor: pointer;

    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23facc15' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.green-theme .row-2 select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2322c55e' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.red-theme .row-2 select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ef4444' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.row-2 select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #262626;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.2);
}

select option {
    background: #1f1f1f;
    color: white;
}

.row-2 .add-btn {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: 0.25s ease;
    font-size: 1rem;
}

:root:not(.red-theme):not(.green-theme) .add-btn {
    background: #eab308;
    color: #000;
}

.green-theme .add-btn {
    background: #22c55e;
    color: #000;
}

.red-theme .add-btn {
    background: #ef4444;
    color: #fff;
}

.add-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.add-btn:active {
    transform: translateY(0);
}


/*filtrovanie*/
.filter-section {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background: #2b2b2b;
    border: 1px solid #3b3b3b;
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: #3c3c3c;
}

.filter-btn.active {
    background: var(--primary-color);
    color: #000;
    border-color: transparent;
    font-weight: 600;
}

/*napady*/
.todo-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.todo-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.25s ease;
}

.todo-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(250, 204, 21, 0.15);
}

.todo-item.completed {
    opacity: 0.55;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--text-secondary);
}

/*checkbox*/
.todo-checkbox {
    width: 24px;
    height: 24px;
    accent-color: var(--primary-color);
}

/*text*/
.todo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.todo-text {
    font-size: 1.05rem;
}

/*kategorie*/
.category-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
    border: 1px solid var(--primary-color);
    background: rgba(250, 204, 21, 0.12);
    color: var(--primary-color);
}

.delete-btn {
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: transform 0.2s ease; 
}

.delete-btn:hover {
    transform: scale(1.25);
}

.all-tasks-box {
    margin-top: 30px;
    padding: 20px;
    background: #1e1e1e;
    border-radius: 12px;
    border: 1px solid #333;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.all-tasks-box h2 {
    margin-bottom: 15px;
    color: #fff;
    font-size: 20px;
}

.all-task-item {
    padding: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #444;
    color: #ddd;
}

.all-task-item:last-child {
    border-bottom: none;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/*responzivnost*/
@media (max-width: 768px) {
    .input-group {
        grid-template-columns: 1fr;
    }
}
