:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(20, 20, 30, 0.7);
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #555568;
    --accent-primary: #5eecd0;
    --accent-secondary: #3cb5a0;
    --accent-tertiary: #2a8a78;
    --accent-warning: #ffe66d;
    --accent-urgent: #ff6b6b;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --shadow-glow: 0 0 60px rgba(94, 236, 208, 0.15);
    --font-primary: 'Outfit', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
}

.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    z-index: 1000;
}

.gradient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 0.8s ease-out;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 2rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Toolbar below logo */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--border-subtle);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-subtle);
}

.user-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.user-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.lang-btn:hover,
.lang-btn.active {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.lang-current {
    font-family: var(--font-mono);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 160px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.lang-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.lang-option.active {
    background: rgba(94, 236, 208, 0.1);
    color: var(--accent-secondary);
}

.lang-flag {
    font-size: 1.2rem;
    line-height: 1;
}

.lang-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
    text-decoration: none;
}

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

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.lang-btn svg {
    width: 16px;
    height: 16px;
}

.lang-text {
    font-weight: 500;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    backdrop-filter: blur(20px);
    z-index: 1000;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.lang-option.active {
    background: rgba(94, 236, 208, 0.1);
    color: var(--accent-secondary);
}

.lang-flag {
    font-size: 1.25rem;
}

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

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.logo-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.logo-text {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.02em;
}

.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.objective-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.75rem;
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out both;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.objective-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.objective-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.objective-card:hover::before {
    opacity: 1;
}

/* Completed goal styles */
.objective-card.completed {
    background: linear-gradient(135deg, rgba(94, 236, 208, 0.08), rgba(94, 236, 208, 0.03));
    border-color: rgba(94, 236, 208, 0.3);
    position: relative;
}

.objective-card.completed::before {
    opacity: 1;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary), var(--accent-secondary));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.objective-card.completed::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(94, 236, 208, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

.objective-card.completed:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(94, 236, 208, 0.2);
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

.completed-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(94, 236, 208, 0.2), rgba(94, 236, 208, 0.1));
    border: 1px solid rgba(94, 236, 208, 0.4);
    border-radius: 12px;
    color: var(--accent-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: completedPulse 2s ease-in-out infinite;
}

.completed-badge svg {
    animation: checkmark 0.6s ease-out;
}

@keyframes completedPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(94, 236, 208, 0.4);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(94, 236, 208, 0);
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.completed-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(94, 236, 208, 0.1);
    border-radius: 8px;
    flex: 1;
}

.completed-message {
    font-size: 0.85rem;
    color: var(--accent-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.completed-message::before {
    content: '🎉';
    font-size: 1rem;
}

.objective-card.completed .objective-text {
    color: var(--text-primary);
    opacity: 0.9;
}

.objective-card.completed .progress-bar-fill {
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(94, 236, 208, 0.5);
    }
    50% { 
        box-shadow: 0 0 15px rgba(94, 236, 208, 0.8);
    }
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.objective-number {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.deadline {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(94, 236, 208, 0.1);
    border: 1px solid rgba(94, 236, 208, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.deadline.soon {
    background: rgba(255, 230, 109, 0.1);
    border-color: rgba(255, 230, 109, 0.3);
}

.deadline.soon .days-count {
    color: var(--accent-warning);
}

.deadline.urgent {
    background: rgba(255, 71, 87, 0.1);
    border-color: rgba(255, 71, 87, 0.3);
    animation: urgentPulse 2s ease-in-out infinite;
}

.deadline.urgent .days-count {
    color: var(--accent-urgent);
}

@keyframes urgentPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.days-count {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-secondary);
    line-height: 1;
}

.days-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.objective-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-weight: 300;
    flex: 1;
}

/* Progress indicator in card */
.progress-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.progress-bar-container {
    flex: 1;
    height: 6px;
    background: var(--border-subtle);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-percentage {
    font-size: 0.75rem;
    color: var(--accent-secondary);
    font-family: var(--font-mono);
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

.tracking-count,
.habit-occurrences {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-weight: 500;
    white-space: nowrap;
    margin-left: 0.25rem;
}

.btn-expand-logs {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.btn-expand-logs:hover {
    background: var(--border-subtle);
    color: var(--text-primary);
}

.btn-expand-logs.expanded svg {
    transform: rotate(180deg);
}

/* Tracking Logs Accordion */
.tracking-logs {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 300px;
    opacity: 1;
    margin-bottom: 1rem;
}

.tracking-logs.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 0.5rem;
}

.logs-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.log-entry {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.6rem;
    background: var(--bg-card);
    border-radius: 6px;
    font-size: 0.75rem;
}

.log-date {
    color: var(--text-muted);
    font-family: var(--font-mono);
    min-width: 80px;
}

.log-value {
    color: var(--accent-secondary);
    font-weight: 500;
}

.log-comment {
    color: var(--text-secondary);
    font-style: italic;
    margin-left: auto;
    opacity: 0.8;
}

.logs-more {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.3rem;
}

.logs-view-all {
    display: block;
    text-align: center;
    padding: 0.6rem;
    margin-top: 0.5rem;
    color: var(--accent-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.logs-view-all:hover {
    background: rgba(94, 236, 208, 0.1);
}

/* History Page */
.history-page {
    max-width: 800px;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-secondary);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.history-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-secondary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-entry {
    display: flex;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s ease;
}

.history-entry:hover {
    border-color: rgba(94, 236, 208, 0.3);
}

.entry-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
    padding-right: 1rem;
    border-right: 1px solid var(--border-subtle);
}

.date-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.date-month {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.entry-content {
    flex: 1;
}

.entry-value {
    margin-bottom: 0.5rem;
}

.value-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: rgba(94, 236, 208, 0.15);
    color: var(--accent-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.value-badge.habit {
    background: rgba(94, 236, 208, 0.2);
}

.value-badge.checklist {
    background: rgba(255, 230, 109, 0.15);
    color: var(--accent-warning);
}

.entry-comment {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
    margin: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

.page-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.page-link:hover {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.page-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

.due-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.due-date svg {
    opacity: 0.6;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn svg {
    transition: transform 0.2s ease;
}

.btn-track {
    color: var(--accent-warning);
}

.btn-track:hover {
    background: rgba(255, 230, 109, 0.15);
    border-color: var(--accent-warning);
}

.btn-track:hover svg {
    transform: scale(1.1);
}

.btn-track.has-tracking {
    color: var(--accent-secondary);
    border-color: rgba(94, 236, 208, 0.3);
    background: rgba(94, 236, 208, 0.1);
}

.btn-track.has-tracking:hover {
    background: rgba(94, 236, 208, 0.2);
    border-color: var(--accent-secondary);
}

.btn-edit {
    color: var(--accent-secondary);
}

.btn-edit:hover {
    background: rgba(94, 236, 208, 0.15);
    border-color: var(--accent-secondary);
}

.btn-edit:hover svg {
    transform: rotate(-5deg);
}

.btn-delete {
    color: var(--accent-urgent);
}

.btn-delete:hover {
    background: rgba(255, 71, 87, 0.15);
    border-color: var(--accent-urgent);
}

.btn-delete:hover svg {
    transform: scale(1.1);
}

.delete-form {
    display: inline;
}

.page-footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

.page-footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Form styles */
.back-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-secondary);
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.goal-form {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(20px);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group textarea,
.form-group input {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-group textarea:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(94, 236, 208, 0.1);
}

.char-count {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-cancel,
.btn-save {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    width: auto;
    height: auto;
}

.btn-cancel {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.btn-cancel:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-save {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    color: white;
    cursor: pointer;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(94, 236, 208, 0.3);
}

/* Datepicker wrapper */
.datepicker-wrapper {
    position: relative;
}

.datepicker-wrapper input {
    padding-right: 3rem;
    cursor: pointer;
}

.calendar-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Flatpickr custom theme */
.flatpickr-calendar {
    background: #12121a !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    font-family: var(--font-primary);
}

.flatpickr-calendar.arrowTop::before,
.flatpickr-calendar.arrowTop::after {
    display: none !important;
}

.flatpickr-months {
    background: rgba(20, 20, 30, 0.7) !important;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.flatpickr-months .flatpickr-month {
    background: transparent !important;
    color: #f0f0f5 !important;
    height: 40px;
}

.flatpickr-current-month {
    font-size: 1rem;
    font-weight: 600;
    color: #f0f0f5 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: #12121a !important;
    color: #f0f0f5 !important;
    font-weight: 600;
}

.flatpickr-current-month .flatpickr-monthDropdown-months option {
    background: #12121a !important;
    color: #f0f0f5 !important;
}

.flatpickr-current-month input.cur-year {
    color: #f0f0f5 !important;
    font-weight: 600;
    background: transparent !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #8888a0 !important;
    fill: #8888a0 !important;
    padding: 0.5rem;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    color: #5eecd0 !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #5eecd0 !important;
}

.flatpickr-innerContainer {
    background: #12121a !important;
    padding: 0.5rem;
}

.flatpickr-rContainer {
    background: #12121a !important;
}

.flatpickr-weekdays {
    background: #12121a !important;
}

.flatpickr-weekday {
    color: #555568 !important;
    font-size: 0.75rem;
    font-weight: 500;
    background: #12121a !important;
}

.flatpickr-days {
    border: none !important;
    background: #12121a !important;
}

.dayContainer {
    background: #12121a !important;
}

.flatpickr-day {
    color: #f0f0f5 !important;
    border-radius: 8px !important;
    border: none !important;
    font-weight: 500;
    background: transparent !important;
}

.flatpickr-day:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: transparent !important;
    color: #f0f0f5 !important;
}

.flatpickr-day.today {
    border: 1px solid #5eecd0 !important;
    color: #5eecd0 !important;
    background: transparent !important;
}

.flatpickr-day.today:hover {
    background: rgba(94, 236, 208, 0.1) !important;
    color: #5eecd0 !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: linear-gradient(135deg, #5eecd0, #3cb5a0) !important;
    border-color: transparent !important;
    color: #0a0f0e !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #555568 !important;
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    background: transparent !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #555568 !important;
    opacity: 0.4 !important;
    background: transparent !important;
}

/* Alt input styling */
.flatpickr-input.flatpickr-mobile,
input.flatpickr-input[readonly] {
    cursor: pointer;
}

input.flatpickr-input + input {
    background: #12121a !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 10px;
    color: #f0f0f5 !important;
    font-family: var(--font-primary);
    padding: 1rem;
    padding-right: 3rem;
    width: 100%;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input.flatpickr-input + input:focus {
    outline: none;
    border-color: #5eecd0 !important;
    box-shadow: 0 0 0 3px rgba(94, 236, 208, 0.1);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(94, 236, 208, 0.15);
    border: 1px solid rgba(94, 236, 208, 0.3);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 100;
    text-decoration: none;
}

.fab:hover {
    background: rgba(94, 236, 208, 0.25);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
}

.fab:active {
    transform: translateY(0);
}

.fab svg {
    transition: transform 0.2s ease;
}

.fab:hover svg {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }
    
    .logo-text {
        font-size: 2rem;
    }
    
    .objectives-grid {
        grid-template-columns: 1fr;
    }
    
    .objective-card {
        padding: 1.25rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-save {
        width: 100%;
        text-align: center;
    }

    .fab {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.modal.open .modal-content {
    transform: translateY(0) scale(1);
}

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

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.tracking-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.tracking-option {
    cursor: pointer;
}

.tracking-option input {
    display: none;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.tracking-option input:checked + .option-card {
    border-color: var(--accent-secondary);
    background: rgba(94, 236, 208, 0.1);
}

.option-card:hover {
    border-color: var(--border-hover);
}

.tracking-option input:checked + .option-card:hover {
    border-color: var(--accent-secondary);
}

.option-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 10px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.tracking-option input:checked + .option-card .option-icon {
    background: rgba(94, 236, 208, 0.15);
    color: var(--accent-secondary);
}

.option-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.option-title {
    font-weight: 500;
    color: var(--text-primary);
}

.option-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-actions .btn-cancel,
.modal-actions .btn-save {
    padding: 0.75rem 1.5rem;
    width: auto;
    height: auto;
}

/* Tracking Config Styles */
.tracking-config {
    margin-bottom: 1.5rem;
}

.config-group {
    margin-bottom: 1.25rem;
}

.config-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.config-group input[type="text"],
.config-group input[type="number"],
.config-group select,
.config-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.config-group input:focus,
.config-group select:focus,
.config-group textarea:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(94, 236, 208, 0.1);
}

.config-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238888a0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.config-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.config-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Day Selector */
.day-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.day-option {
    cursor: pointer;
}

.day-option input {
    display: none;
}

.day-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.day-option input:checked + span {
    background: rgba(94, 236, 208, 0.15);
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.day-option span:hover {
    border-color: var(--border-hover);
}

/* Range Input */
.range-input {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.range-input input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    outline: none;
}

.range-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.range-input input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.range-input input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.range-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-secondary);
    min-width: 45px;
    text-align: right;
}

/* Progress Modal Styles */
.progress-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.progress-display.large {
    margin-bottom: 1.5rem;
}

.progress-current {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 600;
    color: var(--accent-secondary);
}

.progress-separator {
    font-size: 2rem;
    color: var(--text-muted);
}

.progress-target {
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--text-secondary);
}

.progress-unit {
    font-size: 1rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.progress-percent {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-bar-large {
    height: 12px;
    background: var(--bg-card);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* Habit Styles */
.habit-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.habit-streak {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.habit-schedule {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn-habit-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-habit-check:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(94, 236, 208, 0.3);
}

.btn-habit-check.completed {
    background: rgba(255, 71, 87, 0.2);
    border: 1px solid var(--accent-urgent);
}

.btn-habit-check.completed:hover {
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.3);
}

.habit-toggle-form {
    margin-bottom: 1.5rem;
}

.habit-toggle-form .config-group {
    margin-bottom: 1rem;
}

.habit-dates-section {
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
}

.habit-dates-section h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.habit-dates-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.habit-date-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    border-radius: 8px;
}

.date-text {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.date-remove {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-remove:hover {
    background: rgba(255, 71, 87, 0.2);
    color: var(--accent-urgent);
}

.no-dates {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
}

/* Habit calendar completed days */
.flatpickr-day.completed-day {
    background: rgba(94, 236, 208, 0.3) !important;
    border-color: #5eecd0 !important;
}

.flatpickr-day.completed-day:hover {
    background: rgba(94, 236, 208, 0.4) !important;
}

/* Checklist Styles */
.checklist-progress {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: 10px;
    transition: background 0.2s ease;
}

.checklist-item:hover {
    background: var(--bg-secondary);
}

.task-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-subtle);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.task-checkbox:hover {
    border-color: var(--accent-secondary);
}

.task-checkbox.checked {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    color: white;
}

.task-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
}

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

.add-task-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#progress-checklist .modal-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    justify-content: center;
}

#progress-checklist .modal-actions .btn-save {
    width: 100%;
    max-width: 200px;
}

.add-task-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
}

.add-task-form input:focus {
    outline: none;
    border-color: var(--accent-secondary);
}

.btn-add-task {
    width: 44px;
    height: 44px;
    border: 1px solid var(--accent-secondary);
    border-radius: 10px;
    background: rgba(94, 236, 208, 0.1);
    color: var(--accent-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-task:hover {
    background: rgba(94, 236, 208, 0.2);
}

@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn-cancel,
    .modal-actions .btn-save {
        width: 100%;
        text-align: center;
    }

    .day-selector {
        justify-content: center;
    }

    .progress-current {
        font-size: 2.5rem;
    }

    .progress-percent {
        font-size: 3rem;
    }
}

/* Tags System Styles */

/* Tag Filters */
.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.filter-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(94, 236, 208, 0.2), rgba(94, 236, 208, 0.1));
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
    box-shadow: 0 2px 8px rgba(94, 236, 208, 0.2);
}

/* Tags Section in Card */
.tags-section {
    margin-bottom: 1rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: rgba(94, 236, 208, 0.1);
    border: 1px solid rgba(94, 236, 208, 0.3);
    border-radius: 12px;
    color: var(--accent-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--font-mono);
    position: relative;
    transition: all 0.2s ease;
}

.tag-chip:hover {
    background: rgba(94, 236, 208, 0.15);
    border-color: rgba(94, 236, 208, 0.5);
}

.tag-remove-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 0.25rem;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--accent-secondary);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.tag-remove-inline:hover {
    opacity: 1;
    background: rgba(255, 71, 87, 0.2);
    color: var(--accent-urgent);
    transform: scale(1.1);
}

/* Tag Form Styles (in create/edit forms) */
.tag-input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tag-input-wrapper input[type="text"] {
    flex: 1;
    padding: 0.6rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-primary);
    transition: all 0.2s ease;
}

.tag-input-wrapper input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-secondary);
    background: var(--bg-card);
}

.tag-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 0.5rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2rem;
}

.tag-chip-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    background: rgba(94, 236, 208, 0.1);
    border: 1px solid rgba(94, 236, 208, 0.3);
    border-radius: 12px;
    color: var(--accent-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font-mono);
    animation: tagFadeIn 0.3s ease-out;
}

@keyframes tagFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tag-chip-form .tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--accent-secondary);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0.7;
    margin-left: 0.25rem;
}

.tag-chip-form .tag-remove:hover {
    opacity: 1;
    background: rgba(255, 71, 87, 0.2);
    color: var(--accent-urgent);
    transform: scale(1.1);
}

.btn-add-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(94, 236, 208, 0.1);
    border: 1px solid rgba(94, 236, 208, 0.3);
    border-radius: 8px;
    color: var(--accent-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-tag:hover {
    background: rgba(94, 236, 208, 0.2);
    border-color: rgba(94, 236, 208, 0.5);
    transform: scale(1.05);
}

/* Responsive adjustments for tags */
@media (max-width: 768px) {
    .tag-filters {
        gap: 0.4rem;
        margin-bottom: 1.5rem;
    }

    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .tag-chip {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}

/* Notification Modal */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.notification-modal.open {
    opacity: 1;
    visibility: visible;
}

.notification-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.notification-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem;
    max-width: 380px;
    width: 90%;
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.notification-modal.open .notification-content {
    transform: translateY(0) scale(1);
}

.notification-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-card);
}

.notification-icon svg {
    width: 28px;
    height: 28px;
}

/* Notification type styles */
.notification-modal.type-info .notification-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.notification-modal.type-success .notification-icon {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.notification-modal.type-warning .notification-icon {
    background: rgba(255, 230, 109, 0.15);
    color: var(--accent-warning);
}

.notification-modal.type-error .notification-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.notification-message {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.btn-notification-close {
    padding: 0.75rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-notification-close:hover {
    background: var(--border-hover);
    border-color: var(--border-hover);
}

.notification-modal.type-info .btn-notification-close:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.notification-modal.type-success .btn-notification-close:hover {
    border-color: #22c55e;
    color: #22c55e;
}

.notification-modal.type-warning .btn-notification-close:hover {
    border-color: var(--accent-warning);
    color: var(--accent-warning);
}

.notification-modal.type-error .btn-notification-close:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Confirm Modal */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.confirm-modal.open {
    opacity: 1;
    visibility: visible;
}

.confirm-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.confirm-content {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem;
    max-width: 380px;
    width: 90%;
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.confirm-modal.open .confirm-content {
    transform: translateY(0) scale(1);
}

.confirm-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 71, 87, 0.15);
    color: var(--accent-urgent);
}

.confirm-message {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.confirm-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-confirm-cancel,
.btn-confirm-ok {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.btn-confirm-cancel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.btn-confirm-cancel:hover {
    background: var(--border-hover);
    border-color: var(--border-hover);
}

.btn-confirm-ok {
    background: var(--accent-urgent);
    border: none;
    color: white;
}

.btn-confirm-ok:hover {
    background: #ff6b6b;
    transform: translateY(-1px);
}

/* Language Selector */
.language-selector {
    position: relative;
    display: inline-block;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.language-btn svg {
    opacity: 0.7;
}

#currentLang {
    font-family: var(--font-mono);
    font-size: 12px;
}

.language-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 8px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.language-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.language-option.active {
    background: rgba(94, 236, 208, 0.1);
    color: var(--accent-primary);
}

.language-option .flag {
    font-size: 20px;
}

/* Language selector in header */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.header-top .language-selector {
    margin-left: auto;
}

/* Language selector in auth pages */
.auth-card .language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
}

/* Drag and Drop Styles */
.objective-card:not(.completed) {
    cursor: grab;
}

.objective-card:not(.completed):active {
    cursor: grabbing;
}

.objective-card.dragging {
    opacity: 0.4;
    transform: rotate(2deg) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.objective-card.drag-over {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-primary);
}

.drag-placeholder {
    background: rgba(94, 236, 208, 0.08);
    border: 2px dashed var(--accent-primary);
    border-radius: 16px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: placeholder-pulse 1.5s ease-in-out infinite;
}

.drag-placeholder .placeholder-content {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(94, 236, 208, 0.15);
}

@keyframes placeholder-pulse {
    0%, 100% {
        opacity: 0.5;
        border-color: var(--accent-primary);
    }
    50% {
        opacity: 0.8;
        border-color: var(--accent-secondary);
    }
}

/* Drag handle indicator on hover */
.objective-card:not(.completed)::after {
    content: '⋮⋮';
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: -3px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.objective-card:not(.completed):hover::after {
    opacity: 0.6;
}

.objective-card:not(.completed).dragging::after {
    opacity: 0;
}

