/* Clean Modern Styling - Collaborative Todo App */
:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --glass-bg: rgba(30, 41, 59, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-glow: rgba(249, 115, 22, 0.15);
    
    /* Harmonious Theme Colors */
    --primary-orange: #f97316; /* Hinzufügen (Orange) */
    --primary-orange-hover: #ea580c;
    --status-yellow: #eab308; /* Bearbeitet wird (Gelb) */
    --status-yellow-hover: #ca8a04;
    --status-green: #22c55e; /* Fertig (Grün) */
    --status-green-hover: #16a34a;
    --status-red: #ef4444; /* Löschen (Rot) */
    --status-red-hover: #dc2626;
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
    --text-muted: #64748b;
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-darker);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Beautiful Radial Animated Background */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: 
        radial-gradient(circle at 10% 20%, rgba(249, 115, 22, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 1) 0%, rgba(2, 6, 23, 1) 100%);
    background-size: cover;
}

.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: flex;
    justify-content: center;
}

/* Glassmorphism Cards */
.card.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    transition: var(--transition-smooth);
}

.card.glass:hover {
    border-color: rgba(249, 115, 22, 0.2);
    box-shadow: 0 8px 32px 0 rgba(249, 115, 22, 0.05);
}

.hidden {
    display: none !important;
}

/* Auth views */
.auth-view h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-view .subtitle {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group label i {
    margin-right: 6px;
    color: var(--primary-orange);
}

.input-group input, 
.input-group textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 12px 16px;
    color: var(--text-white);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 12px var(--glass-glow);
    background: rgba(15, 23, 42, 0.8);
}

/* Email validation styles */
.input-group input.valid {
    border-color: var(--status-green);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

.input-group input.invalid {
    border-color: var(--status-red);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.validation-msg {
    font-size: 0.8rem;
    margin-top: 6px;
    font-weight: 500;
    display: none;
    animation: slideUp 0.2s ease-out;
}

.validation-msg.success {
    color: var(--status-green);
    display: block;
}

.validation-msg.error {
    color: var(--status-red);
    display: block;
}

/* Buttons styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    width: 100%;
}

.btn-primary {
    background: var(--primary-orange);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--primary-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

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

.btn-success {
    background: var(--status-green);
    color: var(--text-white);
}

.btn-success:hover {
    background: var(--status-green-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-orange {
    background: var(--primary-orange);
    color: var(--text-white);
    width: auto;
}

.btn-orange:hover {
    background: var(--primary-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.btn-yellow {
    background: var(--status-yellow);
    color: var(--bg-darker);
    width: auto;
}

.btn-yellow:hover {
    background: var(--status-yellow-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: var(--status-red);
    width: auto;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--status-red);
}

.btn-danger {
    background: var(--status-red);
    color: var(--text-white);
    width: auto;
}

.btn-danger:hover {
    background: var(--status-red-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-gray);
    width: auto;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}

.auth-toggle {
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.auth-toggle a {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.auth-toggle a:hover {
    color: var(--primary-orange-hover);
    text-decoration: underline;
}

/* Verification Specifics */
.email-info-badge {
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
    padding: 10px;
    border-radius: var(--border-radius-md);
    margin-bottom: 25px;
    color: var(--primary-orange);
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

/* DASHBOARD LAYOUT */
#dashboard-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn 0.4s ease-out;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    border-radius: var(--border-radius-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-profile .avatar {
    font-size: 1.5rem;
    color: var(--primary-orange);
}

.user-profile .username {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-white);
}

.dashboard-main {
    width: 100%;
}

.todos-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    min-height: 500px;
    backdrop-filter: blur(10px);
}

.todos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
}

.todos-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
}

.refresh-indicator {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-indicator i {
    animation: spin 2s linear infinite;
    display: none;
}

.refresh-indicator.loading i {
    display: inline-block;
}

/* Todos list rendering */
.todos-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.todo-item {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
    animation: slideUp 0.3s ease-out;
}

.todo-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.6);
    transform: translateY(-1px);
}

.todo-item-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.todo-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-white);
    line-height: 1.4;
    word-break: break-word;
}

.todo-meta {
    font-size: 0.8rem;
    color: var(--text-gray);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.todo-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.todo-meta-item i {
    color: var(--primary-orange);
}

.todo-status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-open {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-gray);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-in_progress {
    background: rgba(234, 179, 8, 0.1);
    color: var(--status-yellow);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.status-done {
    background: rgba(34, 197, 94, 0.1);
    color: var(--status-green);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.todo-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.todo-actions .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--border-radius-md);
    width: auto;
}

/* Empty view state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: var(--text-muted);
    gap: 16px;
}

.empty-state i {
    font-size: 3rem;
    color: var(--glass-border);
}

.empty-state p {
    font-size: 1.05rem;
}

/* MODAL OVERLAY */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    padding: 30px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 12px;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-header .close-btn {
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
}

.modal-header .close-btn:hover {
    color: var(--text-white);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
}

/* Toast System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
    width: 100%;
}

.toast {
    background: rgba(30, 41, 59, 0.9);
    border-left: 4px solid var(--primary-orange);
    color: var(--text-white);
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    animation: slideInLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: var(--transition-smooth);
}

.toast.toast-success {
    border-left-color: var(--status-green);
}

.toast.toast-error {
    border-left-color: var(--status-red);
}

.toast-message {
    font-size: 0.9rem;
    font-weight: 500;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 1.1rem;
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Kanban Board Layout - Now strictly Tabs everywhere */
.kanban-board {
    margin-top: 10px;
}

.kanban-column {
    display: none; /* Hidden by default */
    background: transparent;
    border: none;
    padding: 0;
    backdrop-filter: none;
}

.kanban-column.active {
    display: flex; /* Visible when active */
    flex-direction: column;
    gap: 16px;
    animation: fadeIn 0.3s ease-out;
}

.column-header {
    display: none; /* Hidden on all devices, as tabs serve as header */
}

/* Tab navigation row - Centered on desktop, full-width on mobile */
.kanban-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    background: rgba(15, 23, 42, 0.4);
    padding: 6px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--glass-border);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.tab-btn i {
    font-size: 1.1rem;
}

.tab-btn .badge {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-gray);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.tab-btn.active {
    background: var(--primary-orange);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}

.tab-btn.active i {
    color: var(--text-white);
}

.tab-btn.active .badge {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Premium Todo Item Adjustments */
.todo-item {
    background: rgba(30, 41, 59, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    transition: var(--transition-smooth);
    animation: slideUp 0.3s ease-out;
}

.todo-item.border-open {
    border-left: 4px solid var(--text-muted);
}

.todo-item.border-in_progress {
    border-left: 4px solid var(--status-yellow);
}

.todo-item.border-done {
    border-left: 4px solid var(--status-green);
}

.todo-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(30, 41, 59, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.todo-title {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-white);
    line-height: 1.4;
    word-break: break-word;
}

.todo-actions {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    width: 100%;
}

.todo-actions .btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    width: 100%;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.todo-actions .btn-delete {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--status-red);
    width: 38px;
    height: 38px;
    padding: 0;
}

.todo-actions .btn-delete:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--status-red);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.total-badge {
    background: rgba(249, 115, 22, 0.12);
    color: var(--primary-orange);
    border: 1px solid rgba(249, 115, 22, 0.25);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Responsive adjust */
@media(max-width: 768px) {
    .app-container {
        padding: 10px;
    }

    .todos-container {
        padding: 16px;
        min-height: 400px;
    }

    .kanban-tabs {
        gap: 6px;
        padding: 4px;
        border-radius: var(--border-radius-md);
    }

    .tab-btn {
        font-size: 0.8rem;
        padding: 10px 4px;
        flex-direction: column;
        gap: 4px;
    }

    .tab-btn i {
        font-size: 1rem;
    }

    .tab-btn .badge {
        margin-top: 2px;
        font-size: 0.7rem;
        padding: 1px 6px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        padding: 16px;
    }

    .header-left {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .header-left .btn {
        flex: 1;
        margin: 0;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .todo-item {
        padding: 14px 16px;
        gap: 12px;
    }
}
