:root {
    /* Ultra-Modern Dark Theme */
    --bg-primary: #080811;
    --bg-secondary: #0f0f1e;
    --bg-tertiary: #16162b;
    --bg-card: rgba(20, 20, 40, 0.7);
    --bg-card-hover: rgba(30, 30, 55, 0.9);
    
    /* Premium Text Colors */
    --text-primary: #f8f9fc;
    --text-secondary: #c5c7d8;
    --text-tertiary: #8b8da8;
    --text-muted: #5a5c75;
    
    /* Vibrant Accent Colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #d946ef;
    --accent-cyan: #06b6d4;
    --accent-hover: #4f46e5;
    --accent-light: rgba(99, 102, 241, 0.15);
    
    /* Status Colors */
    --success: #0cebeb;
    --error: #ff4d6d;
    --warning: #ffbe0b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-secondary: linear-gradient(135deg, #5b86e5 0%, #36d1dc 100%);
    --gradient-glow: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    
    /* Shadows */
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 50px rgba(102, 126, 234, 0.5);
    
    /* Animations */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-color: #667eea #080811;
    scrollbar-width: thin;
}

html::-webkit-scrollbar {
    width: 12px;
}

html::-webkit-scrollbar-track {
    background: #080811;
}

html::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 6px;
}

html::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7a8ff5 0%, #8b5cb8 50%, #f5a7ff 100%);
    box-shadow: 0 0 10px rgba(240, 147, 251, 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(102, 126, 234, 0.15), transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(118, 75, 162, 0.15), transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(240, 147, 251, 0.1), transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: -0.01em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(15, 15, 30, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-size: 28px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    text-decoration: none;
    cursor: pointer;
}

nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-secondary,
.btn-logout,
.btn-login {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover,
.btn-logout:hover,
.btn-login:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-secondary:active,
.btn-logout:active,
.btn-login:active {
    transform: scale(0.98);
}

/* Main Content */
main {
    flex: 1;
    padding: 30px 20px;
}

.hero-section {
    margin-bottom: 30px;
}

.hero-section h2 {
    font-size: 42px;
    margin-bottom: 25px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

/* Form */
.task-form {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.task-form:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-glow);
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.form-title {
    font-weight: 600;
    color: var(--text-primary);
}

.form-hint {
    color: var(--text-muted);
    font-size: 12px;
}

.task-form input[type="text"],
.task-form input[type="datetime-local"],
.task-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 15, 30, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    margin-bottom: 15px;
    transition: all var(--transition-fast);
}

.task-form input[type="text"]:focus,
.task-form input[type="datetime-local"]:focus,
.task-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.task-form textarea {
    resize: none;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row select {
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    color: #ffffff;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-row select option {
    background: #1a1a1a;
    color: #ffffff;
}

.form-row select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: #1a1a1a;
    color: #ffffff;
}

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

.char-counter {
    color: var(--text-muted);
    font-size: 12px;
}

/* Buttons */
.btn-primary {
    padding: 12px 24px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

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

.btn-icon {
    font-size: 16px;
}

/* Tasks Grid */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

/* Task Card */
.task-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.task-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.task-card.completed {
    opacity: 0.6;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.task-title {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    word-break: break-word;
}

.task-card.completed .task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-priority {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    margin-left: 10px;
}

.task-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.task-category {
    font-size: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.task-due-date {
    font-size: 12px;
    color: var(--text-muted);
}

.task-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
    word-break: break-word;
}

.task-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    padding-top: 15px;
}

.btn-small {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    transition: all var(--transition-fast);
    flex: 1;
    text-align: center;
}

.btn-small:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

/* Message */
.message {
    display: none;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideIn var(--transition-base);
}

.message.success {
    background: rgba(12, 235, 235, 0.15);
    color: var(--success);
    border: 1px solid rgba(12, 235, 235, 0.3);
}

.message.error {
    background: rgba(255, 77, 109, 0.15);
    color: var(--error);
    border: 1px solid rgba(255, 77, 109, 0.3);
}

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

/* Footer */
footer {
    background: rgba(15, 15, 30, 0.8);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    padding: 30px 0;
    text-align: center;
    color: var(--text-muted);
    margin-top: auto;
}

/* Login Container */
.login-container {
    max-width: 450px;
    margin: 60px auto;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 20px;
}

.login-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.label-icon {
    margin-right: 8px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 15, 30, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.checkbox-group {
    margin: 30px 0 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-text {
    display: flex;
    flex-direction: column;
}

.checkbox-text strong {
    color: var(--text-secondary);
    font-size: 14px;
}

.checkbox-text small {
    color: var(--text-muted);
    font-size: 12px;
}

.btn-login-submit {
    width: 100%;
    justify-content: center;
}

/* View Task Modal */
.view-task-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.view-task-modal.active {
    display: flex;
}

.view-task-content {
    background: var(--bg-secondary);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn var(--transition-base);
}

.view-task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.view-task-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-task-close:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
}

.view-task-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    word-break: break-word;
    line-height: 1.3;
}

.view-task-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.view-task-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.view-task-description {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    padding: 15px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
}

.view-task-description:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.btn-view {
    padding: 4px 8px;
    background: none;
    border: none;
    color: var(--accent-primary);
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.btn-view:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-hover);
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    main {
        padding: 25px 15px;
    }

    .hero-section {
        margin-bottom: 25px;
    }

    .hero-section h2 {
        font-size: 32px;
        margin-bottom: 20px;
    }

    .task-form {
        padding: 20px;
        margin-bottom: 25px;
    }

    .tasks-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    header .container {
        flex-direction: column;
        gap: 12px;
    }

    nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .login-container {
        margin: 30px auto;
        padding: 25px 20px;
        max-width: calc(100% - 20px);
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    main {
        padding: 15px 10px;
    }

    .hero-section {
        margin-bottom: 20px;
    }

    .hero-section h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    header {
        padding: 15px 0;
    }

    header .container {
        padding: 0 10px;
    }

    .logo {
        font-size: 24px;
    }

    nav {
        gap: 8px;
    }

    .btn-secondary,
    .btn-logout,
    .btn-login {
        padding: 6px 12px;
        font-size: 12px;
    }

    .task-form {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 12px;
    }

    .form-header {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 15px;
    }

    .form-title {
        font-size: 14px;
    }

    .form-hint {
        font-size: 11px;
    }

    .task-form input[type="text"],
    .task-form input[type="datetime-local"],
    .task-form textarea {
        padding: 10px 12px;
        margin-bottom: 12px;
        font-size: 16px;
    }

    .form-row {
        gap: 10px;
        margin-bottom: 12px;
    }

    .form-row select {
        padding: 10px 12px;
        font-size: 14px;
    }

    .form-footer {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .char-counter {
        font-size: 11px;
    }

    .btn-primary {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }

    .btn-icon {
        font-size: 14px;
    }

    .login-container {
        margin: 20px auto;
        padding: 20px 15px;
        border-radius: 16px;
    }

    .login-icon {
        font-size: 40px;
        margin-bottom: 15px;
    }

    .login-header h2 {
        font-size: 22px;
    }
    
    /* View Task Modal Mobile */
    .view-task-content {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
    }
    
    .view-task-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .view-task-meta {
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .view-task-meta-item {
        font-size: 11px;
        padding: 6px 10px;
        gap: 6px;
    }
    
    .view-task-description {
        font-size: 13px;
        padding: 12px;
    }
    
    .view-task-close {
        width: 28px;
        height: 28px;
        font-size: 24px;
        font-size: 24px;
        margin-bottom: 8px;
    }

    .login-subtitle {
        font-size: 12px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        margin-bottom: 6px;
        font-size: 13px;
    }

    .form-group input[type="text"],
    .form-group input[type="password"] {
        padding: 11px 14px;
        font-size: 16px;
    }

    footer {
        padding: 20px 0;
        font-size: 11px;
    }
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
    .task-card {
        animation: fadeIn var(--transition-slow);
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Selection */
textarea,
input,
[contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    user-select: text;
}

body {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

