:root {
    /* Brand Colors */
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #a855f7;
    --accent: #ec4899;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(168, 85, 247, 0.4) 100%);

    /* Backgrounds */
    --bg-dark: #030305;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --text-main: #ffffff;
    --text-muted: #94a3b8;

    /* Effects */
    --blur-strength: 16px;
    --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overscroll-behavior-y: none;
    /* Prevent pull-to-refresh style leaks */
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
}

/* Gradient Background Mesh with Animated Blobs */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #030305;
    overflow: hidden;
}

.bg-mesh::before,
.bg-mesh::after {
    content: "";
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: -1;
    animation: float 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
}

.bg-mesh::before {
    background: radial-gradient(circle, var(--primary), transparent 70%);
    top: -200px;
    left: -200px;
}

.bg-mesh::after {
    background: radial-gradient(circle, var(--secondary), transparent 70%);
    bottom: -200px;
    right: -200px;
    animation-delay: -10s;
}

/* Floating Blobs (V2 Premium) */
.bg-mesh .blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #ec4899, transparent 70%);
    filter: blur(100px);
    opacity: 0.08;
    border-radius: 50%;
    animation: float 25s infinite alternate-reverse ease-in-out;
}

.blob-1 {
    top: 15%;
    right: 5%;
    background: radial-gradient(circle, #6366f1, transparent 70%);
    animation-delay: -5s;
}

.blob-2 {
    bottom: 5%;
    left: 10%;
    background: radial-gradient(circle, #a855f7, transparent 70%);
    animation-delay: -15s;
}

.blob-3 {
    top: 40%;
    left: 45%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, #ec4899, transparent 70%);
    filter: blur(140px);
    opacity: 0.07;
    border-radius: 50%;
    position: absolute;
    animation: float 28s infinite alternate ease-in-out;
    animation-delay: -8s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(10%, 15%) scale(1.1);
    }

    100% {
        transform: translate(-5%, -10%) scale(0.9);
    }
}

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

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.col-span-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .glass-card {
        padding: 1.2rem;
    }
}

/* Landing */
.landing-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: black;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 1.1rem;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(255, 255, 255, 0.3);
}

/* Dashboard Layout */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    width: 100%;
    min-height: 80vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Nav Bar Styles */
.nav-bar {
    display: flex;
    gap: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    background: var(--bg-dark);
    z-index: 100;
    padding: 0.5rem 0;
}

.nav-tab {
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-tab:hover {
    color: white;
}

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

.dashboard-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.dashboard-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: white;
}

/* Dashboard Grid */
.grid-cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* Rows/Spacers */


.lever-row {
    margin-bottom: 2rem;
    position: relative;
}

.lever-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Inputs */
label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

input[type="text"],
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.8rem;
    color: white;
    font-family: var(--font-body);
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Sliders (OCEAN) */
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    /* Thicker track for easier targeting */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    outline: none;
    margin: 1.5rem 0;
    cursor: pointer;
    touch-action: none;
    /* Prevent scroll interference */
    position: relative;
    z-index: 5;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 26px;
    /* Larger thumb */
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 15px var(--primary-glow);
    border: 2px solid white;
    /* More visible */
    transition: transform 0.1s ease;
}

.range-slider::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

.range-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border: 2px solid white;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 15px var(--primary-glow);
    transition: transform 0.1s ease;
}

.range-slider::-moz-range-thumb:active {
    transform: scale(1.2);
}

/* Tags */
.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    min-height: 50px;
}

.tag {
    background: rgba(236, 72, 153, 0.2);
    border: 1px solid rgba(236, 72, 153, 0.4);
    color: #fce7f3;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag span {
    cursor: pointer;
    opacity: 0.7;
}

.tag span:hover {
    opacity: 1;
}

.tags-input-container input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.5rem;
    margin: 0;
    min-width: 100px;
}

.tags-input-container input:focus {
    border: none;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.2s;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-save {
    background: var(--gradient-primary);
    color: white;
    width: 100%;
    margin-top: auto;
    border: none;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    filter: brightness(1.1);
}

/* Tooltip */
.tooltip-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    text-align: center;
    line-height: 16px;
    font-size: 10px;
    margin-left: 5px;
    cursor: help;
}

/* Tooltips */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 10px;
    color: var(--text-muted);
    cursor: help;
    margin-left: 6px;
    position: relative;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.tooltip-icon:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.tooltip-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 240px;
    padding: 0.8rem 1rem;
    background: rgba(15, 15, 18, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    font-family: var(--font-body);
    font-weight: 400;
}

.tooltip-icon:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.glass-card {
    overflow: visible !important;
}

/* FullCalendar Overrides */
.fc {
    color: var(--text-main);
    font-family: var(--font-body);
}

.fc-toolbar-title {
    color: white !important;
    font-size: 1.25rem !important;
}

.fc-button {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-muted) !important;
    text-transform: capitalize;
    font-weight: 500;
}

.fc-button-active {
    background-color: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

.fc-col-header-cell-cushion,
.fc-daygrid-day-number,
.fc-list-day-text,
.fc-list-day-side-text {
    color: var(--text-muted) !important;
    text-decoration: none !important;
}

.fc-theme-standard td,
.fc-theme-standard th,
.fc-theme-standard .fc-scrollgrid {
    border-color: var(--glass-border) !important;
}

.fc-day-today {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.dashed-event {
    border-style: dashed !important;
    border-width: 2px !important;
}

/* --- MOBILE REDESIGN V2 --- */

/* Hero Card */
.hero-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.hero-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-snippet {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
}

.btn-hero {
    flex: 1;
    padding: 0.6rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: 0.2s;
}

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

.btn-hero:hover {
    filter: brightness(1.1);
}

/* Segmented Control */
.segmented-control {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    border: 1px solid var(--glass-border);
}

.segmented-btn {
    flex: 1;
    padding: 0.6rem;
    text-align: center;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
}

.segmented-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* --- RESPONSIVE UTILITIES --- */
.mobile-only {
    display: none;
}

.desktop-only {
    display: flex;
    /* Or block, depending on usage */
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none !important;
    }
}

/* FAB - Mobile Only by default via media query */
.fab {
    display: none;
    /* Hidden on Desktop */
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 25px -5px var(--primary-glow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s;
}

.fab:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Prevent body scroll when modal is open */
.no-scroll {
    overflow: hidden;
    height: 100vh;
    touch-action: none;
    /* Helps on some mobile devices */
}


@media (max-width: 768px) {
    .fab {
        display: flex;
        /* Show on Mobile */
        bottom: 5.5rem;
        right: 1.2rem;
    }
}

/* --- MOBILE V3: RHYTHM & BOTTOM SHEET --- */

/* Rhythm Strip (Pills) */
.rhythm-strip {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: none;
}

.rhythm-strip::-webkit-scrollbar {
    display: none;
}

.rhythm-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    min-width: 160px;
    flex-shrink: 0;
}

.rhythm-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.rhythm-pill.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.rhythm-icon {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-right: 0.8rem;
}

.rhythm-pill.active .rhythm-icon {
    background: var(--gradient-primary);
    color: white;
}

.pill-label {
    flex: 1;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.rhythm-pill.active .pill-label {
    color: white;
}

.pill-day {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.pill-icon {
    font-size: 1.2rem;
}

/* Bottom Sheet */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
    touch-action: none;
    /* Prevent touch scrolling propagation */
    overscroll-behavior: contain;
}

.bottom-sheet-overlay.open {
    display: block;
    opacity: 1;
}

.bottom-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #1e1e24;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 1.5rem;
    z-index: 2001;
    transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 80vh;
    overflow-y: auto;
}

.bottom-sheet.open {
    bottom: 0;
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto 1.5rem auto;
}

.sheet-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    color: white;
}

.style-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.style-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}

.style-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.style-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.style-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.style-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* --- NAVIGATION UPLIFT --- */

/* Desktop Nav (Transparent) */
.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    position: relative;
    z-index: 100;
}

.logo-area {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.desktop-nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
}

.nav-link-item:hover,
.nav-link-item.active {
    color: var(--primary);
}

/* Mobile Hamburger & Drawer */
.hamburger-btn {
    display: none;
    /* Desktop default */
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 200;
}

.nav-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: -280px;
    /* Hidden */
    width: 250px;
    height: 100%;
    background: #0f172a;
    /* Dark Slate */
    border-left: 1px solid var(--glass-border);
    padding: 2rem;
    z-index: 160;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

.nav-drawer.open {
    right: 0;
}

.nav-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.drawer-link {
    font-size: 1.2rem;
    color: white;
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsiveness */
@media (max-width: 768px) {
    .desktop-nav-links {
        display: none;
    }

    .hamburger-btn {
        display: block;
    }
}

/* BRAIN TAB UPLIFT */
.brain-section-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Mad Libs Builder */
.mad-libs-container {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    line-height: 2;
    color: var(--text-main);
}

.mad-libs-input {
    background: rgba(99, 102, 241, 0.1);
    border: none;
    border-bottom: 2px solid var(--primary);
    color: white;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    padding: 0 0.5rem;
    margin: 0 0.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
}

.mad-libs-input:focus {
    outline: none;
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 15px var(--primary-glow);
}

.mad-libs-select {
    background: rgba(168, 85, 247, 0.1);
    border: none;
    border-bottom: 2px solid var(--secondary);
    color: white;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    padding: 0 0.5rem;
    margin: 0 0.2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mad-libs-select:focus {
    outline: none;
    background: rgba(168, 85, 247, 0.2);
}

/* Voice DNA Styling */
.voice-dna-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.voice-dna-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: white;
}

.voice-dna-header i {
    color: var(--primary);
}

/* =========================================
   GHOSTWRITER V2 DESIGN SYSTEM COMPONENTS
   ========================================= */

/* --- ATOMS --- */

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

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

/* Inputs */
.input-group {
    margin-bottom: 1rem;
}

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

.input-field {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    color: white;
    font-family: var(--font-body);
    transition: 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Toggles */
.toggle-switch {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-switch.active::after {
    transform: translateX(20px);
}


/* --- MOLECULES --- */

/* Glass Card */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-card);
}

/* Rhythm Pill */
.rhythm-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
    width: 200px;
}

.rhythm-pill.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.rhythm-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.rhythm-pill.active .rhythm-icon {
    background: var(--gradient-primary);
    color: white;
}

/* Persona Card */
.persona-card {
    width: 160px;
    padding: 1.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.persona-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.persona-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* Post Card */
.post-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    transition: 0.3s;
    overflow: hidden;
}

.post-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-draft {
    background: rgba(253, 224, 71, 0.1);
    color: #facc15;
    border: 1px solid rgba(253, 224, 71, 0.2);
}

.status-scheduled {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.post-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem 0;
    line-height: 1.3;
}

.post-excerpt {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-visual {
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.custom-checkbox input:checked+.checkbox-visual {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-visual i {
    color: white;
    font-size: 0.7rem;
    opacity: 0;
    transform: scale(0.5);
    transition: 0.2s;
}

.custom-checkbox input:checked+.checkbox-visual i {
    opacity: 1;
    transform: scale(1);
}

.custom-checkbox input {
    display: none;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(15, 15, 22, 0.6);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: 0.2s;
}

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

.nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-weight: 600;
}

/* User Profile Summary */
.user-profile-summary {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
}

.user-profile-summary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    padding: 2px;
    /* Border */
}

.user-avatar img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.user-info {
    flex: 1;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.user-role {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}


/* Calendar Grid */
.calendar-grid {
    display: grid;
    gap: 1px;
    background: var(--glass-border);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
}

.calendar-day {
    background: rgba(15, 15, 22, 0.4);
    min-height: 150px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.calendar-header {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
}

/* Content Blocks */
.content-block {
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    border: 1px solid transparent;
}

.content-block:hover {
    transform: translateY(-2px);
}

/* State 1: Empty / Opportunity */
.block-empty {
    border: 1px dashed rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 60px;
}

.block-empty:hover {
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
}

/* State 2: Draft */
.block-draft {
    background: rgba(253, 224, 71, 0.1);
    /* Yellow tint */
    border-color: rgba(253, 224, 71, 0.3);
    color: #fef08a;
}

.block-draft:hover {
    background: rgba(253, 224, 71, 0.15);
}

/* State 3: Scheduled */
.block-scheduled {
    background: rgba(96, 165, 250, 0.1);
    /* Blue tint */
    border-color: rgba(96, 165, 250, 0.3);
    color: #bfdbfe;
}

.block-scheduled:hover {
    background: rgba(96, 165, 250, 0.15);
}

.block-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.block-meta {
    font-size: 0.75rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Upload Dropzone */
.dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    transition: 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 180px;
}

.dropzone:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.dropzone-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    transition: 0.3s;
}

.dropzone:hover .dropzone-icon {
    color: var(--primary);
    transform: translateY(-5px);
}

.dropzone-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.dropzone-highlight {
    color: var(--primary);
    font-weight: 600;
}

/* Reroll Component */
.reroll-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    gap: 1rem;
}

.reroll-info {
    flex: 1;
}

.reroll-btn-large {
    background: var(--gradient-primary);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: 0.3s;
}

.reroll-btn-large:hover {
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 8px 25px var(--primary-glow);
}

/* --- LAYOUTS --- */
/* Auth Split Layout */
.auth-split-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

.auth-marketing {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem;
    overflow: hidden;
    background: var(--bg-dark);
}

.auth-feature-list {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.auth-panel {
    width: 100%;
    max-width: 500px;
    background: rgba(15, 15, 22, 0.6);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-left: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    position: relative;
    z-index: 10;
}

@media (max-width: 900px) {
    .auth-split-layout {
        flex-direction: column;
    }

    .auth-marketing {
        padding: 3rem;
        flex: none;
        height: 40vh;
    }

    .auth-panel {
        max-width: 100%;
        flex: 1;
        border-left: none;
        border-top: 1px solid var(--glass-border);
        padding: 2rem;
    }
}

/* Footer & Disclaimer */
.site-footer {
    padding: 3rem 2rem;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
    /* Push to bottom */
    text-align: center;
    width: 100%;
    z-index: 10;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 600px;
}

.footer-links {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

/* Landing Page Design */
.hero-section {
    padding: 8rem 2rem 4rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero-main-title {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.auth-buttons-hero {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 24px;
    text-align: left;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    box-shadow: 0 8px 16px var(--primary-glow);
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

@media (max-width: 968px) {
    .hero-main-title {
        font-size: 3.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .auth-buttons-hero {
        flex-direction: column;
        align-items: center;
    }
}

/* Updated Footer */
.site-footer {
    padding: 4rem 2rem;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--glass-border);
    margin-top: 6rem;
    text-align: center;
    width: 100%;
}