:root {
    --primary: #0052FF;
    --primary-light: #E0E7FF;
    --secondary: #64748B;
    --accent: #FF3B7F;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --bg: #F8FAFC;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text: #0F172A;
    --text-muted: #64748B;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    background-image:
        radial-gradient(at 0% 0%, hsla(215, 100%, 93%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(210, 100%, 95%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(220, 100%, 95%, 1) 0, transparent 50%);
    min-height: 100vh;
}

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 0.9rem;
}

.header-profile-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s;
}

.header-profile-link:hover {
    transform: scale(1.05);
}

.header-avatar,
.header-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: var(--shadow);
}

.lucide {
    width: 18px;
    height: 18px;
    stroke-width: 2.2px;
}

.btn:active {
    transform: scale(0.97);
}

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

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 10px 15px -3px rgba(0, 82, 255, 0.3);
}

/* Layout Styles */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.header-left {
    text-decoration: none;
    transition: transform 0.2s;
}

.header-left:hover {
    transform: scale(1.02);
}

.header-left h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.025em;
}

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

.current-date {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-bar {
    margin: 1rem 2rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: transparent;
    border: none;
    box-shadow: none;
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.n-info {
    background: rgba(224, 231, 255, 0.8);
    color: var(--primary);
    border-left: 4px solid var(--primary);
}

.n-success {
    background: rgba(209, 250, 229, 0.8);
    color: #065F46;
    border-left: 4px solid var(--success);
}

.n-warning {
    background: rgba(254, 243, 199, 0.8);
    color: #92400E;
    border-left: 4px solid var(--warning);
}

.n-danger {
    background: rgba(254, 226, 226, 0.9);
    color: #B91C1C;
    border-left: 4px solid var(--danger);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.shake {
    animation: shake 0.82s cubic-bezier(.36, .07, .19, .97) both;
}

.main-content {
    padding: 1rem 2rem 8rem;
}

.bottom-nav {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
}

.bottom-nav a {
    padding: 0.75rem 1.25rem;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    transition: all 0.2s;
    gap: 4px;
}

.bottom-nav a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.bottom-nav a.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 82, 255, 0.25);
}

/* Calendar Styles */
.calendar-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.calendar-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 5px 20px;
}

.nav-btn {
    text-decoration: none;
    color: var(--primary);
    font-weight: bold;
    padding: 10px;
    transition: transform 0.2s;
}

.nav-btn:hover {
    transform: scale(1.2);
}

.current-month {
    text-transform: capitalize;
    min-width: 150px;
    text-align: center;
    font-size: 1.2rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    gap: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.day-header {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: 700;
    font-size: 0.8rem;
}

.calendar-day {
    min-height: 100px;
    background: white;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    transition: background 0.3s;
    cursor: pointer;
}

.calendar-day:hover {
    background: #f8f9ff;
}

.calendar-day.other-month {
    background: rgba(255, 255, 255, 0.4);
    color: #ccc;
}

.calendar-day.today {
    background: #f0edff;
}

.calendar-day.today .day-number {
    background: var(--primary);
    color: white;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.day-number {
    font-weight: 600;
    font-size: 0.9rem;
}

.day-events {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.calendar-event-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}

.event-tooltip {
    visibility: hidden;
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.2s;
}

.calendar-event-dot:hover .event-tooltip {
    visibility: visible;
    opacity: 1;
}

.more-events {
    font-size: 0.6rem;
    color: var(--secondary);
    font-weight: bold;
}

.calendar-filters {
    padding: 5px 15px;
}

.filter-select {
    border: none;
    background: transparent;
    font-family: inherit;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px 25px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.legend-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    background: white;
}

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

.modal-header h3 {
    font-size: 1.25rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

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

.standard-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
}

.standard-form input,
.standard-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    font-family: inherit;
}

.member-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    background: var(--bg);
    padding: 15px;
    border-radius: 10px;
}

.member-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
}

.member-checkbox input {
    width: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #E2E8F0;
}

/* Day Details Styles */
.day-details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.day-event-item {
    background: var(--bg);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid var(--primary);
    transition: transform 0.2s;
}

.day-event-item:hover {
    transform: translateX(5px);
}

.event-time {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 50px;
}

.event-main-info {
    flex-grow: 1;
}

.event-title {
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 4px;
}

.event-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-assignee {
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.empty-day {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* Animations */
@keyframes pop {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUp {
    0% {
        transform: translateY(10px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-pop {
    animation: pop 0.3s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}