/* Global Styles */
:root {
    --bg-dark: #0a0a0a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --accent: #00e5ff;
    --accent-glow: rgba(0, 229, 255, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --glass-blur: 12px;
    --font-main: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
    cursor: none;
    /* Custom cursor */
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Animated Background Particles */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.15;
}

/* Custom Cursor */
.cursor-dot {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 999999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-dot.active {
    width: 35px;
    height: 35px;
    background-color: var(--accent-glow);
    border-color: transparent;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.logo {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.accent {
    color: var(--accent);
}

.header-section h1 {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Glassmorphism Utility */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--accent-glow);
    border-color: var(--accent);
}

/* Layout Grid (3 Columns) */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
    width: 100%;
}

@media (min-width: 1200px) {
    .layout-grid {
        grid-template-columns: 300px minmax(0, 1fr) 300px;
    }
}

/* Sidebars */
.sidebar {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 25px;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 100%;
    overflow: hidden;
}

.sidebar-title {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid rgba(0, 229, 255, 0.2);
    padding-bottom: 10px;
    font-weight: 600;
}

/* Metrics Row (Left Sidebar) */
.metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.metric-card {
    padding: 15px 10px;
    text-align: center;
}

.metric-card h4 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
}

.metric-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 5px 0 0;
}

.metric-card.highlight h4 {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Progress Bar */
.progress-container {
    margin-top: auto;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #007bff, var(--accent));
    border-radius: 10px;
    transition: width 0.5s ease-out;
}

.progress-text {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Charts */
.chart-wrapper {
    position: relative;
    height: 200px;
    width: 100%;
    margin-bottom: 10px;
}

.charts-row {
    display: flex;
    justify-content: space-around;
    gap: 5px;
}

.chart-box {
    width: 80px;
    text-align: center;
}

.chart-label {
    display: block;
    font-size: 0.75rem;
    margin-top: 5px;
    color: var(--text-secondary);
}

/* Main Planner Wrapper */
#planner {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 30px;
    padding: 15px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    #planner {
        padding: 25px;
    }
}

#planner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #007bff);
}

/* Grid Layout inside Planner */
.planner-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    max-width: 100%;
    overflow: hidden;
    min-width: 0;
}

@media (min-width: 768px) {
    .planner-grid {
        grid-template-columns: minmax(0, 1fr);
        /* Central column stacks horizontally by sections */
    }
}

/* Cards inside planner */
.card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.05);
    border-color: rgba(0, 229, 255, 0.3);
}

.full-width {
    grid-column: 1 / -1;
}

.section-title {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

/* Checkbox Tasks */
.time-block {
    margin-bottom: 20px;
}

.time-block h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 5px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    margin-bottom: 8px;
    transition: background 0.3s, transform 0.3s;
    cursor: pointer;
}

.checkbox-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.checkbox-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
}

.custom-checkbox {
    appearance: none;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.custom-checkbox:checked {
    background-color: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent-glow);
}

.custom-checkbox::after {
    content: '✓';
    color: #000;
    font-size: 14px;
    font-weight: bold;
    display: none;
}

.custom-checkbox:checked::after {
    display: block;
}

.checkbox-row label {
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
    user-select: none;
    flex: 1;
}

/* Days Container (Consistency Tracker) */
.days-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 5px;
    margin-bottom: 30px;
    justify-content: flex-start;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.days-container::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome */
}

.day-circle {
    flex: 0 0 45px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    color: var(--text-secondary);
}

.day-circle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.day-circle.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent-glow);
}

.day-circle.completed {
    border-color: #00e5ff;
    color: #00e5ff;
    text-shadow: 0 0 5px var(--accent-glow);
}

/* Kanban Board */
.kanban-section {
    padding: 10px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.kanban-board {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 15px;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
    min-width: 0;
}

/* Custom Horizontal Scrollbar for Kanban Board */
.kanban-board::-webkit-scrollbar {
    height: 6px;
}

.kanban-board::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.kanban-board::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.kanban-board::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.kanban-column {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    min-width: 180px;
    /* Reduced to help fit more items */
    padding: 15px;
}

.column-header {
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
    margin-bottom: 15px;
    display: inline-block;
}

.kanban-items {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kanban-card {
    background: var(--card-bg);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    cursor: grab;
    font-size: 0.85rem;
    transition: transform 0.2s, background 0.2s;
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.add-card-btn {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: transparent;
    border: 1px dashed var(--text-secondary);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

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

/* Strategy Notes */
.strategy-card ul {
    list-style: none;
}

.strategy-card li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 6px 8px;
    border-radius: 6px;
    margin-left: -8px;
    /* Offset padding to align text correctly visually */
}

.strategy-card li:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
    transform: translateX(5px);
}

.strategy-card i {
    color: var(--accent);
    font-size: 0.8rem;
}

.mt-3 {
    margin-top: 15px;
}

/* Buttons */
.glow-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.primary-btn {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
}

.primary-btn:hover {
    background: #fff;
    box-shadow: 0 0 25px var(--accent-glow);
    transform: translateY(-2px);
}

.danger-btn {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
    text-decoration: none;
    justify-content: center;
}

.danger-btn:hover {
    background: #ff4444;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.4);
    transform: translateY(-2px);
}

/* Auth Overlay / Modal Tools */
.auth-overlay,
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    display: none;
    /* hidden by default */
}

.modal-active {
    display: flex;
}

.auth-box {
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.auth-box input:not([type="checkbox"]),
.modal-content input:not([type="checkbox"]) {
    width: 100%;
    padding: 12px;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: #fff;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
}

.auth-box input:not([type="checkbox"]):focus,
.modal-content input:not([type="checkbox"]):focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 229, 255, 0.05);
}

/* Fix Native Select Dropdowns in Dark Mode */
select option {
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

.modal-content {
    background-color: var(--bg-dark);
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    border: 1px solid var(--accent);
    border-radius: 20px;
    padding: 30px;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: white;
}

.warning-text {
    color: #ff4444;
    margin-bottom: 10px;
}

/* Mobile Adjustments */
@media (max-width: 900px) {
    .hide-on-mobile {
        display: none !important;
    }
}

/* Utilities */
.fade-in {
    opacity: 0;
    /* JS GSAP handles reveal */
}

.blur-content {
    filter: blur(5px);
    transition: filter 0.3s;
}

footer {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
    margin-top: 40px;
}

/* -----------------------------------------------------
   WEEKLY CALENDAR VIEW
------------------------------------------------------ */
.weekly-calendar-container {
    background: rgba(18, 18, 18, 0.8);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 600px;
    /* Fixed height for scrollable body */
}

.calendar-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    background: #1e1e1e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.day-header {
    text-align: center;
    padding: 15px 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    border-left: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.2);
}

.day-header .date-num {
    font-size: 1.3rem;
    color: white;
    font-weight: 500;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.day-header.today .date-num {
    background: var(--accent);
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 15px var(--accent-glow), inset 0 0 5px rgba(255, 255, 255, 0.5);
    border: none;
}

.calendar-body {
    display: grid;
    grid-template-columns: 80px 1fr;
    flex: 1;
    overflow-y: auto;
    /* Scroll times vertically */
    position: relative;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: rgba(18, 18, 18, 0.4);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
    padding-top: 15px;
    padding-bottom: 20px;
    max-height: 400px;
}

/* Hide scrollbar for sleek look */
.calendar-body::-webkit-scrollbar {
    width: 6px;
}

.calendar-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.calendar-body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.calendar-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.time-column {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--card-border);
}

.time-slot {
    height: 40px;
    /* 1 hour = 40px height */
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding-right: 15px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    position: relative;
    top: -8px;
    /* Offset to align top borderline with text center */
}

.calendar-grid {
    position: relative;
    /* Grid for the 7 days exactly matching header */
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: transparent;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 40px;
    /* 1 hour horizontal lines */
}

.grid-day-col {
    border-left: 1px solid rgba(255, 255, 255, 0.03);
    height: 100%;
    position: relative;
    box-sizing: border-box;
    transition: background 0.2s;
}

.grid-day-col:hover {
    background: rgba(255, 255, 255, 0.01);
}

.current-time-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    z-index: 5;
    pointer-events: none;
}

.current-time-line .red-dot {
    position: absolute;
    left: -4px;
    top: -3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.event-block {
    position: absolute;
    left: 4px;
    right: 4px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(0, 229, 255, 0.05));
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    padding: 6px 8px;
    color: white;
    font-size: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.event-block:hover {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(0, 229, 255, 0.1));
    border: 1px solid rgba(0, 229, 255, 0.4);
    border-left: 3px solid var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 229, 255, 0.2);
    z-index: 3;
}

.event-title {
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.event-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.65rem;
    font-weight: 500;
}

/* -----------------------------------------------------
   MINI CALENDAR VIEW
------------------------------------------------------ */
.weekly-calendar-container {
    flex: 1;
    /* Take up main space */
}

.mini-calendar {
    width: 280px;
    display: flex;
    flex-direction: column;
}

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

.mc-month-year {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.mc-nav button {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.mc-nav button:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.mc-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 10px;
}

.mc-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.mc-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.mc-day:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mc-day.other-month {
    color: rgba(255, 255, 255, 0.2);
}

.mc-day.active {
    background: rgba(0, 229, 255, 0.15);
    color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
    border: 1px solid var(--accent);
}