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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.3);
    z-index: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-20px) translateX(10px);
    }
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#bgVideo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    object-fit: cover;
    image-rendering: auto;
    image-rendering: high-quality;
    -ms-interpolation-mode: bicubic;
}


.container {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 600;
    flex-shrink: 0;
}

.input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.js-name-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.js-name-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.js-due-date {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
    cursor: pointer;
}

.js-due-date:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.add-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.add-btn:active {
    transform: translateY(0);
}

/* Scrollable wrapper for todo list */
.todo-list-wrapper {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    padding-right: 5px;
}

/* Custom scrollbar styling */
.todo-list-wrapper::-webkit-scrollbar {
    width: 8px;
}

.todo-list-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.todo-list-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.todo-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.js-todo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.todo-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    align-items: center;
    padding: 16px 20px;
    background: rgba(248, 249, 250, 0.9);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.todo-item:hover {
    background: rgba(240, 241, 245, 0.95);
    border-color: #667eea;
    transform: translateX(5px);
}

.todo-name {
    font-size: 16px;
    color: #333;
    font-weight: 500;
    word-break: break-word;
}

.todo-date {
    font-size: 14px;
    color: #666;
    padding: 6px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.delete-btn {
    padding: 8px 16px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #ff3838;
    transform: scale(1.05);
}

.delete-btn:active {
    transform: scale(0.98);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: black;
    font-weight: bold;
    font-size: 16px;
}

.credit {
    font-family: Georgia, 'Times New Roman', Times, serif;
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.credit:hover {
    color: rgba(255, 255, 255, 1);
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Dark mode styles */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-mode .container {
    background: rgba(30, 30, 30, 0.85);
    color: #e0e0e0;
}

body.dark-mode h1 {
    color: #ffffff;
}

body.dark-mode .js-name-input,
body.dark-mode .js-due-date {
    background: rgba(50, 50, 50, 0.8);
    border-color: #555;
    color: #ffffff;
}

body.dark-mode .js-name-input::placeholder {
    color: #aaa;
}

body.dark-mode .js-name-input:focus,
body.dark-mode .js-due-date:focus {
    border-color: #667eea;
    background: rgba(60, 60, 60, 0.9);
}

body.dark-mode .todo-item {
    background: rgba(50, 50, 50, 0.7);
    border-color: transparent;
}

body.dark-mode .todo-item:hover {
    background: rgba(60, 60, 60, 0.9);
    border-color: #667eea;
}

body.dark-mode .todo-name {
    color: #ffffff;
}

body.dark-mode .todo-date {
    background: rgba(40, 40, 40, 0.8);
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .empty-state {
    color: #aaa;
}

body.dark-mode .theme-toggle {
    background: rgba(50, 50, 50, 0.9);
}

body.dark-mode .video-overlay {
    background: rgba(0, 0, 0, 0.4);
}

body.dark-mode .todo-list-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        padding: 25px;
        max-height: 90vh;
    }

    .input-container {
        flex-direction: column;
    }

    .js-name-input {
        min-width: 100%;
    }

    .todo-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .todo-date {
        justify-self: start;
    }
}