/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background: #000000;
}

#spaceBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.auth-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.auth-tab.active {
    background: rgba(59, 130, 246, 0.8);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.auth-form h2 {
    color: white;
    text-align: center;
    margin-bottom: 2rem;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.password-requirements {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.password-requirements span {
    color: white;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.password-requirements ul {
    list-style: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.password-requirements li.valid {
    color: #10b981;
}

.password-requirements li.invalid {
    color: #ef4444;
}

/* Main App */
.hidden {
    display: none !important;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 8px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.header-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.control-btn {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    position: relative;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

/* Calendar */
.calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.calendar-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    width: 90%;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: white;
}

.calendar-nav {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.calendar-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    padding: 10px;
    text-align: center;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.calendar-day.header {
    background: transparent;
    font-weight: bold;
    cursor: default;
}

.calendar-day.other-month {
    color: rgba(255, 255, 255, 0.3);
}

.calendar-day.today {
    background: rgba(59, 130, 246, 0.5);
    border: 2px solid #3b82f6;
}

.calendar-day.has-tasks {
    background: rgba(16, 185, 129, 0.3);
    border: 1px solid #10b981;
}

.calendar-day.selected {
    background: rgba(139, 92, 246, 0.5);
    border: 2px solid #8b5cf6;
    transform: scale(1.1);
}

/* Task Form */
.task-form {
    margin-bottom: 32px;
}

.input-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.task-input {
    flex: 2;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    color: white;
    backdrop-filter: blur(10px);
}

.task-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.date-input {
    flex: 1;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    color: white;
    backdrop-filter: blur(10px);
    min-width: 150px;
}

.add-btn {
    padding: 16px 24px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    min-width: 140px;
}

.add-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* Task List */
.task-list {
    margin-bottom: 32px;
    min-height: 200px;
}

.task-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideIn 0.3s ease-out;
    transition: all 0.3s;
}

.task-item:hover {
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.4);
}

.task-item.completed {
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.05);
}

.task-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.task-checkbox:checked {
    background: #10b981;
    border-color: #10b981;
}

.task-text {
    flex: 1;
    color: white;
    font-size: 1rem;
}

.task-text.completed {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.6);
}

.task-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 10px;
}

.task-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.task-item:hover .task-actions {
    opacity: 1;
}

.action-btn {
    padding: 8px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.action-btn:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.2);
}

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.progress-section {
    margin-bottom: 24px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label {
    font-weight: 500;
    color: white;
}

.progress-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
    animation: progress-glow 2s ease-in-out infinite alternate;
}

@keyframes progress-glow {
    from {
        box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    }
    to {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
    }
}

.motivational-quote {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    margin-bottom: 24px;
    font-size: 0.875rem;
}

.footer-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

@media (min-width: 768px) {
    .footer-controls {
        flex-direction: row;
        justify-content: space-between;
    }
}

.task-counter {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    color: white;
    transform: scale(1.05);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.clear-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.05);
}

/* Developer Credit */
.developer-credit {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}