/* =====================================================
   MoneyPilot - Financial Management Web App
   Modern Light Theme with Green Accents
   ===================================================== */

/* ===== CSS Variables ===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --accent-primary: #3b82f6;
    --accent-secondary: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.15);

    --income-color: #10b981;
    --expense-color: #ef4444;
    --savings-color: #3b82f6;

    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.8);

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 4px 20px var(--accent-glow);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #60a5fa 50%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Glass Effect ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-auth {
    display: flex;
    gap: 12px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: var(--shadow-glow);
}

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

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

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

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

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

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {

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

    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 560px;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--accent-primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 24px;
}

.hero h1 {
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

/* Hero Visual - Dashboard Mockup */
.hero-visual {
    position: relative;
}

.dashboard-mockup {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}

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

.mockup-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.mockup-period {
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.summary-card.income .amount {
    color: var(--income-color);
}

.summary-card.expense .amount {
    color: var(--expense-color);
}

.summary-card.savings .amount {
    color: var(--savings-color);
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.amount {
    font-size: 1.5rem;
    font-weight: 700;
}

.chart-placeholder {
    height: 120px;
    background: linear-gradient(180deg, transparent, var(--bg-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 0 16px 16px;
}

.chart-bar {
    width: 20px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px 4px 0 0;
    animation: grow 1s ease-out forwards;
}

@keyframes grow {
    from {
        height: 0;
    }
}

/* ===== Features Section ===== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-header p {
    color: var(--text-secondary);
    margin-top: 16px;
}

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

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 12px;
}

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

/* ===== How It Works ===== */
.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.step {
    text-align: center;
    padding: 32px;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin: 0 auto 20px;
}

.step h3 {
    margin-bottom: 12px;
}

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

/* ===== CTA Section ===== */
.cta-section {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.03));
}

.cta-box {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 60px;
    max-width: 700px;
    margin: 0 auto;
}

.cta-box h2 {
    margin-bottom: 16px;
}

.cta-box p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ===== Footer ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== Auth Page ===== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-box {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 48px;
    width: 100%;
    max-width: 420px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-social {
    width: 100%;
    padding: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.btn-social:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--accent-primary);
    font-weight: 500;
}

/* ===== Dashboard ===== */
.dashboard-layout {
    min-height: 100vh;
}

.sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    position: fixed;
    width: 260px;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.main-content {
    margin-left: 260px;
    padding: 32px;
}

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

.page-title {
    font-size: 1.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-actions .form-input {
    padding: 10px 16px;
    height: 48px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    cursor: pointer;
    min-width: 160px;
}

.header-actions .btn {
    height: 48px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Dashboard Cards */
/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.stat-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    font-size: 1.75rem;
}

.stat-card.income .stat-icon-wrapper {
    background: rgba(16, 185, 129, 0.1);
    color: var(--income-color);
}

.stat-card.expense .stat-icon-wrapper {
    background: rgba(239, 68, 68, 0.1);
    color: var(--expense-color);
}

.stat-card.savings .stat-icon-wrapper {
    background: rgba(59, 130, 246, 0.1);
    color: var(--savings-color);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card.income .stat-value {
    color: var(--income-color);
}

.stat-card.expense .stat-value {
    color: var(--expense-color);
}

.stat-card.savings .stat-value {
    color: var(--savings-color);
}

/* Dashboard Content Grid */
.dashboard-content-grid {
    display: block;
    /* Removed 2fr 1fr split since right column is gone */
}

.charts-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

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

/* Transaction List */
.transactions-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 12px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.transaction-item:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.transaction-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 1.25rem;
}

.transaction-details {
    flex: 1;
    min-width: 0;
    /* Prevents overflow */
}

.transaction-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

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

.transaction-amount {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.transaction-amount.income {
    color: var(--income-color);
}

.transaction-amount.expense {
    color: var(--text-primary);
    /* Keep expenses neutral or red if preferred */
}

/* Upload Area */
.upload-area {
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.upload-text {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-content-grid {
        grid-template-columns: 1fr;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .nav-auth,
    .sidebar {
        display: none;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
        padding-bottom: 90px;
        /* Space for bottom nav */
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        position: relative;
        /* Ensure z-index works if needed */
        z-index: 10;
        /* Above stats */
    }

    .header-actions .date-selector {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    /* Force full width for inputs covering potential inline styles */
    .header-actions .form-input,
    .header-actions select,
    .header-actions .btn {
        width: 100% !important;
        min-width: unset;
        min-height: 44px;
        /* Touch target size */
    }

    /* Adjust delete button in the flex container */
    .header-actions .date-selector .btn {
        width: auto !important;
        /* Let delete button size to content */
        flex-shrink: 0;
    }

    .header-actions .date-selector select {
        flex: 1;
        /* Take remaining space */
    }

    .summary-cards,
    .dashboard-content-grid,
    .features-grid,
    .steps-container {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .page-title {
        font-size: 1.25rem;
    }

    h1 {
        font-size: 2rem;
    }

    .transactions-card {
        padding: 16px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* ===== Utilities ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Fix Transaction Table Overflow */
    .transactions-card {
        padding: 16px;
        overflow-x: auto;
        /* Enable horizontal scroll for the card content */
        -webkit-overflow-scrolling: touch;
    }

    /* Optional: Hide sticky header or adjust layout for list items */
    .transactions-list-header {
        min-width: 600px;
        /* Ensure header doesn't squash */
    }

    #transactions-list {
        min-width: 600px;
        /* Ensure rows don't squash */
    }

    /* Alternative: Stack transactions on mobile? 
       For now, horizontal scroll is safer to "fit" without redesigning the row entirely.
    */

    /* Chart responsiveness */
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mt-4 {
    margin-top: 16px;
}

/* --- Custom Picker Styles (Shared) --- */
.picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    visibility: hidden;
    pointer-events: none;
}

.picker-modal.active {
    visibility: visible;
    pointer-events: auto;
}

.picker-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
}

.picker-modal.active .picker-backdrop {
    opacity: 1;
}

.picker-content {
    background: #fff;
    /* Light mode default */
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 2001;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.picker-modal.active .picker-content {
    transform: translateY(0);
}

/* Desktop constraint for picker */
@media (min-width: 768px) {
    .picker-content {
        max-width: 400px;
        width: 100%;
        margin: 0 auto;
        /* Center horizontally */
        left: 0;
        right: 0;
        bottom: 20px;
        border-radius: 16px;
        transform: translateY(100%);
    }

    .picker-modal.active .picker-content {
        transform: translateY(0);
    }

    .picker-modal {
        align-items: center;
    }
}

/* Dark Mode Support for Picker */
@media (prefers-color-scheme: dark) {
    .picker-content {
        background: #1c1c1e;
        color: #fff;
    }

    .picker-item {
        color: #fff;
    }

    .picker-highlight {
        background: rgba(255, 255, 255, 0.1);
    }

    .picker-header {
        background: rgba(44, 44, 46, 0.8);
    }
}

.picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    background: rgba(240, 240, 240, 0.8);
    backdrop-filter: blur(10px);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.picker-title {
    font-weight: 600;
    font-size: 1rem;
}

.btn-text {
    background: none;
    border: none;
    color: #007aff;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
}

.btn-bold {
    font-weight: 600;
}

.picker-wheels {
    display: flex;
    height: 200px;
    position: relative;
    overflow: hidden;
    justify-content: center;
}

.picker-column {
    flex: 1;
    max-width: 150px;
    height: 100%;
    overflow-y: scroll;
    scroll-behavior: smooth;
    padding: 0;
    position: relative;
    z-index: 2;
    text-align: center;
    scrollbar-width: none;
}

.picker-column::-webkit-scrollbar {
    display: none;
}

.picker-column-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    position: absolute;
    width: 100%;
    top: 0;
    pointer-events: none;
}

.picker-wheel-container {
    padding-top: 80px;
    /* Spacer to center first item */
    padding-bottom: 80px;
}

.picker-item {
    height: 40px;
    line-height: 40px;
    font-size: 1.2rem;
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
}

.picker-item.selected {
    opacity: 1;
    font-weight: 600;
    transform: scale(1.1);
}

.picker-item.has-data {
    opacity: 0.7;
    position: relative;
}

.picker-item.has-data::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
}

.picker-highlight {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 40px;
    margin-top: -20px;
    background: rgba(0, 0, 0, 0.05);
    pointer-events: none;
    z-index: 1;
    border-radius: 8px;
    margin-left: 16px;
    margin-right: 16px;
}