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

:root {
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --secondary: #8B5CF6;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --text: #1E293B;
    --text-light: #64748B;
    --border: #E2E8F0;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Landing Page */
.landing-page {
    background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 50%, #A5B4FC 100%);
    min-height: 100vh;
}

.landing-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
}

.logo-icon {
    width: 24px;
    height: 24px;
}

.header-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.header-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
}

.header-nav a:hover {
    color: var(--primary);
}

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

.btn-login {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-login:hover {
    background: var(--bg);
    border-color: var(--primary);
}

.btn-signup {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-signup:hover {
    background: var(--primary-dark);
}

.landing-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

.landing-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.landing-text {
    max-width: 500px;
}

.landing-headline {
    font-size: 56px;
    font-weight: bold;
    color: #1E293B;
    line-height: 1.2;
    margin-bottom: 24px;
}

.landing-description {
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 40px;
}

.landing-cta {
    display: flex;
    gap: 16px;
}

.btn-primary-large {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}

.btn-primary-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary-large {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary-large:hover {
    background: var(--primary);
    color: white;
}

.landing-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.bubble-panel {
    position: relative;
    width: 500px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: rotate(-2deg);
    overflow: hidden;
}

.bubble-panel .bubble {
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: bubbleFloat 4s ease-in-out infinite;
}

.bubble-panel .bubble span {
    color: white;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    padding: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bubble-panel .bubble-large {
    animation-delay: -1s;
}

.bubble-panel .bubble-medium {
    animation-delay: -2s;
}

@keyframes bubbleFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

/* Auth Modals */
.modal-auth {
    max-width: 400px;
    width: 90%;
}

.btn-full {
    width: 100%;
    margin-top: 8px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-light);
    font-size: 14px;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 968px) {
    .landing-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .landing-headline {
        font-size: 40px;
    }
    
    .bubble-panel {
        width: 100%;
        max-width: 400px;
        height: 400px;
    }
    
    .header-nav {
        display: none;
    }
}

/* Login */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-modal {
    background: var(--surface);
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 20px 25px -5px var(--shadow);
    max-width: 400px;
    width: 90%;
}

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

.login-header h1 {
    font-size: 36px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-light);
    font-size: 16px;
}

.google-signin-container {
    margin-bottom: 16px;
}

.error-message {
    background: #FEE2E2;
    color: #991B1B;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.loading {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

/* Navbar */
.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand h1 {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
}

.navbar-brand .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
}

.navbar-brand .logo-icon {
    width: 24px;
    height: 24px;
}

.navbar-brand .logo-text {
    color: var(--primary);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    color: var(--text-light);
    font-size: 14px;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s;
}

.nav-link:hover {
    background: var(--bg);
}

.btn-logout {
    background: var(--border);
    color: var(--text);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #CBD5E1;
}

/* App Container */
.app-container {
    display: flex;
    min-height: calc(100vh - 64px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 24px;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.btn-sidebar {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: background 0.2s;
}

.btn-sidebar:hover {
    background: var(--primary-dark);
}

.boards-list,
.projects-list {
    list-style: none;
}

.boards-list li,
.projects-list li {
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: background 0.2s;
}

.boards-list li:hover,
.projects-list li:hover {
    background: var(--bg);
}

.boards-list li.active,
.projects-list li.active {
    background: var(--primary);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

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

.dashboard-instructions {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-instruction-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-light);
}

.dashboard-instruction-icon {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.dashboard-instruction-item span {
    display: block;
}

#back-to-board-btn {
    margin-left: 12px;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

#back-to-board-btn:hover {
    color: var(--primary);
}

.content-header h2 {
    font-size: 28px;
    font-weight: bold;
    color: var(--text);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--border);
    color: var(--text);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #CBD5E1;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #DC2626;
}

/* Bubble Canvas */
.bubble-canvas {
    position: relative;
    width: 100%;
    min-height: 600px;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.completed-tasks-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

.completed-tasks-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.completed-tasks-toggle label {
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

/* Search Input */
.search-input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    width: 200px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Zoom Controls */
.zoom-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: var(--bg);
    border-color: var(--primary);
}

/* Canvas Content Wrapper for Zoom/Pan */
.canvas-content {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.1s ease-out;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: move;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
    animation: bubbleFloat 3s ease-in-out infinite;
}

.bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 12px var(--shadow);
}

.bubble.dragging {
    opacity: 0.7;
    z-index: 1000;
    animation: none;
    transform: scale(1.05);
}

.bubble.selected {
    box-shadow: 0 0 0 3px var(--primary);
}

.bubble.task-in-project {
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.bubble.merge-target {
    box-shadow: 0 0 0 4px var(--success);
    transform: scale(1.1);
}

.drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    opacity: 0.5;
}

/* Search Input */
.search-input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    width: 200px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Zoom Controls */
.zoom-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: var(--bg);
    border-color: var(--primary);
}

/* Canvas Content Wrapper for Zoom/Pan */
.canvas-content {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.1s ease-out;
}

.bubble-text {
    color: white;
    font-weight: 500;
    text-align: center;
    padding: 12px;
    word-wrap: break-word;
    font-size: 13px;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 8px;
}

.bubble-edit-input {
    position: absolute;
    inset: 10px;
    border-radius: 999px;
    border: none;
    padding: 6px 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    outline: none;
}

.bubble-actions {
    position: absolute;
    bottom: -8px;
    right: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-out;
}

.bubble:hover .bubble-actions,
.bubble.show-actions .bubble-actions {
    opacity: 1;
    pointer-events: auto;
}

.bubble-action-btn {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
}

.bubble-action-complete {
    background: #22C55E;
    color: white;
}

.bubble-action-edit {
    background: white;
    color: #4B5563;
}

.bubble-completed {
    opacity: 0.7;
}

.bubble-completed .bubble-text {
    text-decoration: line-through;
}

/* Project Bubbles */
.project-bubble {
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
    cursor: pointer;
}

/* Project Overlay */
.project-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.project-overlay-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 28px;
    color: var(--text);
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.project-overlay-close:hover {
    background: white;
    transform: scale(1.1);
}

.project-overlay-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 10%;
}

.project-bubble-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1002;
}

.project-bubble-overlay-item {
    position: absolute;
    pointer-events: all;
    z-index: 1003;
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%) !important;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    padding: 20px;
}

.project-complete-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-top: 12px;
    transition: all 0.2s;
}

.project-complete-btn.active {
    background: #22C55E;
    color: white;
    cursor: pointer;
}

.project-complete-btn.active:hover {
    background: #16A34A;
    transform: scale(1.05);
}

.project-complete-btn.inactive {
    background: #9CA3AF;
    color: #6B7280;
    cursor: not-allowed;
    opacity: 0.5;
}

.project-overlay-tasks {
    position: absolute;
    top: 50%;
    left: calc(50% + 100px); /* Position to the right of center, accounting for bubble size */
    transform: translateY(-50%);
    width: 300px;
    max-height: 60%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: all;
    z-index: 1002;
}

.project-overlay-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 10%;
    pointer-events: auto;
}

.project-overlay-content > * {
    pointer-events: all;
}

/* Linked Task Fields (rectangular, not bubbles) */
.linked-task-field {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border-radius: 8px;
    animation: fadeInTask 0.3s ease-in;
    padding: 12px 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.linked-task-input {
    flex: 1;
    font-size: 14px;
    color: var(--text);
    min-height: 20px;
    line-height: 20px;
}

.linked-task-input.task-completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.linked-task-edit-input {
    flex: 1;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    outline: none;
}

.linked-task-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.linked-task-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: opacity 0.2s;
}

.linked-task-btn:hover {
    opacity: 0.8;
}

.linked-task-complete {
    background: #10B981;
    color: white;
}

.linked-task-undo {
    background: #6B7280;
    color: white;
}

.linked-task-edit {
    background: #3B82F6;
    color: white;
}

.linked-tasks-empty {
    color: var(--text-light);
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

.new-linked-task-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-bottom: 8px;
}

.new-linked-task-btn:hover {
    opacity: 0.9;
}

/* Confetti animation for linked tasks */
.confetti {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: confetti-fall var(--animation-duration, 0.8s) ease-out forwards;
    z-index: 1005;
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--translate-x, 0), var(--translate-y, -40px)) rotate(var(--rotate-z, 0deg));
    }
}

/* Confetti */
.confetti-piece {
    position: absolute;
    width: 6px;
    height: 10px;
    border-radius: 2px;
    opacity: 0;
    animation: confettiBurst 700ms ease-out forwards;
}

@keyframes confettiBurst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--dx, 0), var(--dy, -40px)) scale(0.8);
    }
}

.bubble-pop {
    animation: bubblePop 220ms ease-out forwards;
}

@keyframes bubblePop {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    40% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(0.7);
        opacity: 0;
    }
}

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

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px var(--shadow);
}

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

.modal-header h2 {
    font-size: 20px;
    font-weight: bold;
    color: var(--text);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--bg);
}

.modal-body {
    margin-bottom: 24px;
}

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

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

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.color-picker {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
}

.color-option {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

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

/* Profile */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.profile-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px var(--shadow);
}

.profile-card h2 {
    font-size: 24px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 24px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-item label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 8px;
}

.info-item p {
    color: var(--text);
    font-size: 16px;
}

.mono {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--text-light);
}

/* Profile Page Styles */
.navbar-center {
    display: flex;
    gap: 24px;
    align-items: center;
}

.user-profile-dropdown {
    position: relative;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--primary);
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
    border: none;
    outline: none;
}

.user-profile-btn:hover {
    background: var(--primary-dark);
}

.user-profile-btn:visited,
.user-profile-btn:active,
.user-profile-btn:focus {
    color: inherit;
    text-decoration: none;
}

.user-profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1000;
    padding: 4px 0;
}

.user-profile-dropdown:hover .user-profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
}

.profile-menu-item:hover {
    background: var(--bg);
}

.profile-menu-item-button {
    width: 100%;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 10px;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-name-nav {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.profile-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Profile Hero Card */
.profile-hero-card {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #A78BFA 100%);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 32px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
}

.profile-hero-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 4px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 48px;
    flex-shrink: 0;
}

.profile-hero-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-hero-name {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.profile-hero-email {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.plan-badge {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 6px 16px;
    display: inline-block;
    margin-top: 8px;
}

.plan-badge span {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.btn-signout {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-signout:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Boards Section */
.boards-section-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px var(--shadow);
}

.boards-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.boards-section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.btn-create-board {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-create-board:hover {
    background: var(--primary-dark);
}

/* Boards Tabs */
.boards-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Boards List */
.boards-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.board-item-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: box-shadow 0.2s, transform 0.15s ease-out;
}

.board-item-card:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.board-item-info {
    flex: 1;
}

.board-item-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
}

.board-item-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-light);
}

.board-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.board-status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.board-status-active {
    background: #D1FAE5;
    color: #065F46;
}

.board-status-archived {
    background: #F3F4F6;
    color: #6B7280;
}

.board-action-icons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.board-action-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-light);
}

.board-action-icon:hover {
    background: var(--bg);
    color: var(--text);
}

.board-action-icon svg {
    width: 18px;
    height: 18px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2000;
    pointer-events: none; /* clicks pass through except on toast itself */
}

.toast {
    min-width: 320px;
    max-width: 480px;
    background: #0F172A;
    color: white;
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    pointer-events: auto;
    animation: toast-slide-down 0.25s ease-out;
}

.toast-message {
    margin-right: 12px;
}

.toast-action {
    color: #A5B4FC;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.toast-action:hover {
    color: #C7D2FE;
}

@keyframes toast-slide-down {
    from {
        opacity: 0;
        transform: translate(-50%, -8px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

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

