:root {
    --bg-dark: #0a0a0d;
    --bg-card: rgba(20, 20, 25, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #8b9bb4;

    --accent-blue: #00f3ff;
    --accent-purple: #bc13fe;
    --accent-orange: #ff9100;
    --accent-green: #00ff9d;
    --accent-danger: #ff4d4d;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 10% 10%, rgba(188, 19, 254, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(0, 243, 255, 0.1) 0%, transparent 40%);
    overflow-x: hidden;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.dashboard-header h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.5rem;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.current-date-display {
    font-family: var(--font-body);
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.status-bar {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px var(--accent-green);
}

.status-item {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* Cards */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(20px);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    opacity: 0.7;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.project-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-category {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.d-day-badge {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.d-day-badge.urgent {
    color: var(--accent-danger);
    text-shadow: 0 0 15px rgba(255, 77, 77, 0.4);
}

.d-day-badge.warning {
    color: var(--accent-orange);
    text-shadow: 0 0 15px rgba(255, 145, 0, 0.4);
}

.d-day-badge.safe {
    color: var(--accent-blue);
    text-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.target-date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 5px;
}

/* Subtasks */
.subtasks-container {
    margin-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.subtasks-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.subtask-list {
    list-style: none;
}

.subtask-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    background: var(--glass-bg);
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.subtask-item:hover {
    border-color: var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
}

.subtask-name {
    font-size: 0.95rem;
}

.subtask-d-day {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
}

.subtask-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-right: 8px;
}

/* Footer */
.dashboard-footer {
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .status-bar {
        align-self: flex-start;
    }

    .d-day-badge {
        font-size: 1.5rem;
    }
}

/* Timeline Section */
.timeline-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.timeline-container {
    padding: 1rem 0;
    overflow-x: auto;
    position: relative;
    /* For scroll hiding if needed */
}

/* Custom Scrollbar for timeline */
.timeline-container::-webkit-scrollbar {
    height: 8px;
}

.timeline-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.timeline-track {
    position: relative;
    height: 120px;
    /* Increased height */
    min-width: 800px;
    /* Ensure readability on small screens */
    border-bottom: 2px solid var(--glass-border);
    margin-bottom: 1rem;
    margin-top: 1rem;
}

/* Timeline Components */
.timeline-axis-tick {
    position: absolute;
    bottom: -30px;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.timeline-axis-tick::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 10px;
    background: var(--glass-border);
}

.today-marker {
    position: absolute;
    top: -10px;
    bottom: 0;
    width: 2px;
    background: var(--accent-blue);
    z-index: 10;
    box-shadow: 0 0 15px var(--accent-blue);
    pointer-events: none;
}

.today-marker::after {
    content: 'TODAY';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-blue);
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}

.timeline-item {
    position: absolute;
    top: 50%;
    /* Center vertically in track */
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 5;
}

.timeline-item:hover {
    z-index: 20;
    transform: translate(-50%, -60%) scale(1.1);
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-main);
    margin-bottom: 8px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    border: 3px solid var(--bg-dark);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    box-shadow: 0 0 20px currentColor;
}

.timeline-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(10, 10, 13, 0.9);
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--glass-border);
    position: absolute;
    top: 25px;
    /* Below the dot */
    transform: translateY(10px);
    pointer-events: none;
}

/* Always show label on hover */
.timeline-item:hover .timeline-label {
    opacity: 1;
    transform: translateY(0);
}

/* Show labels for major items by default or urgent ones? */
/* Let's make urgent ones pulse or glow */

@keyframes pulse-urgent {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.4);
    }

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

    100% {
        box-shadow: 0 0 0 0 rgba(255, 77, 77, 0);
    }
}

.timeline-item.urgent .timeline-dot {
    animation: pulse-urgent 2s infinite;
}

/* Calendar Section */
.calendar-section {
    margin-top: 4rem;
    margin-bottom: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.calendar-month {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.calendar-month:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.month-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
    text-align: center;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.calendar-day-header {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 600;
}

.calendar-day {
    font-size: 0.75rem;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    color: var(--text-muted);
    position: relative;
    cursor: default;
}

.calendar-day.current-month {
    background: rgba(255, 255, 255, 0.03);
}

.calendar-day.empty {
    background: transparent;
}

/* Event Highlights */
.calendar-day.has-event {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calendar-day.event-urgent {
    background: rgba(255, 77, 77, 0.2);
    border-color: var(--accent-danger);
    color: #ffcccc;
}

.calendar-day.event-warning {
    background: rgba(255, 145, 0, 0.2);
    border-color: var(--accent-orange);
    color: #ffdcb0;
}

.calendar-day.event-safe {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--accent-blue);
    color: #ccfcff;
}

/* Tooltip for Calendar */
.calendar-day[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    border: 1px solid var(--glass-border);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Holiday Highlights */
.calendar-day.holiday {
    color: var(--accent-danger);
    font-weight: 700;
}

.calendar-day.holiday:hover {
    background: rgba(255, 77, 77, 0.1);
}

/* Today Highlight */
.calendar-day.today {
    border: 2px solid var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue);
    z-index: 10;
}