* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Indie Flower', 'Comic Sans MS', cursive, sans-serif;
    min-height: 100vh;
    padding: 20px;
    transition: background 0.5s ease;
}

/* Темы */
body[data-theme="yellow"] {
    background: linear-gradient(135deg, #f9d423 0%, #ff4e50 100%);
}

body[data-theme="pink"] {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

body[data-theme="blue"] {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
}

body[data-theme="green"] {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

body[data-theme="dark"] {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* Меню выбора темы */
.theme-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 300px;
    z-index: 1000;
}

.theme-btn {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.theme-btn.active {
    background: rgba(255, 255, 255, 1);
    border-color: #333;
    font-weight: bold;
}

.container {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 3em;
    color: #333;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

body[data-theme="dark"] h1 {
    color: #fff;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#taskInput {
    flex: 1;
    padding: 15px;
    border: 3px solid #333;
    border-radius: 5px;
    font-size: 18px;
    font-family: 'Indie Flower', cursive;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.2);
}

#taskInput:focus {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.3);
}

#addBtn {
    padding: 15px 30px;
    background: #333;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.3);
}

#addBtn:hover {
    transform: translateY(-2px);
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.4);
}

#addBtn:active {
    transform: translateY(0);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

.filter-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #333;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.3);
}

.filter-btn.active {
    background: #333;
    color: white;
}

/* Сетка стикеров */
#notesGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px 0;
}

/* Стикер */
.sticky-note {
    background: #feff9c;
    padding: 20px;
    min-height: 150px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: rotate(-1deg);
    transition: all 0.3s ease;
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 3px;
}

.sticky-note:nth-child(even) {
    transform: rotate(1deg);
}

.sticky-note:nth-child(3n) {
    background: #ff7eb9;
}

.sticky-note:nth-child(4n) {
    background: #7afcff;
}

.sticky-note:nth-child(5n) {
    background: #a8ff78;
}

@keyframes popIn {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(-2deg);
    }
    100% {
        transform: scale(1) rotate(-1deg);
        opacity: 1;
    }
}

.sticky-note:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.sticky-note.completed {
    opacity: 0.6;
    filter: grayscale(50%);
}

.sticky-note.completed .task-text {
    text-decoration: line-through;
}

/* Верхняя часть стикера */
.sticky-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.task-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: #333;
}

.delete-btn {
    padding: 5px 10px;
    background: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: rgba(255, 0, 0, 0.9);
    transform: scale(1.1);
}

.task-text {
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    word-wrap: break-word;
    font-family: 'Indie Flower', cursive;
}

/* Подвал */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin: 0 auto;
}

#taskCount {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

#clearCompleted {
    padding: 10px 20px;
    background: #ff6b6b;
    color: white;
    border: 2px solid #333;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3);
}

#clearCompleted:hover {
    transform: translateY(-2px);
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.4);
}

.hidden {
    display: none !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .theme-selector {
        position: static;
        justify-content: center;
        margin-bottom: 20px;
    }

    .container {
        margin-top: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .input-section {
        flex-direction: column;
    }

    #notesGrid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .footer {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    #notesGrid {
        grid-template-columns: 1fr;
    }
}
