/* --- VARIABLES --- */
:root {
    --font-main: 'Poppins', sans-serif;
    --glass-bg: rgba(20, 20, 25, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-focus: rgba(255, 255, 255, 0.1);
    --accent-pink: #FF6B6B;
    --accent-glow: rgba(255, 107, 107, 0.4);
    --accent-gold: #ffd700;
    --text-main: #FFFFFF;
    --text-muted: #8b8b9b;
}

/* --- GLOBAL RESET & BODY --- */
* {
    box-sizing: border-box; 
}

body {
    margin: 0; 
    width: 100vw; 
    height: 100vh;
    background-color: #0f0f13; 
    font-family: var(--font-main); 
    color: var(--text-main);
    overflow: hidden; /* Locks desktop scroll (we unlock this for mobile below) */
    display: flex; 
    justify-content: center; 
    align-items: center;
}

#bg-canvas { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: -1; 
}

/* --- LAYOUT (DESKTOP) --- */
.app-container { 
    display: flex; 
    width: 95vw; 
    max-width: 1100px; 
    height: 90vh; 
    gap: 20px; 
}

/* --- SIDEBAR --- */
.sidebar {
    width: 80px; 
    background: rgba(0, 0, 0, 0.3); 
    backdrop-filter: blur(20px);
    border-radius: 24px; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    padding: 30px 0; 
    border: 1px solid var(--glass-border);
}

.logo-area { margin-bottom: 40px; }

.nav-item {
    width: 48px; 
    height: 48px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: var(--text-muted); 
    font-size: 24px; 
    margin-bottom: 15px; 
    border-radius: 14px;
    cursor: pointer; 
    transition: 0.3s;
}

.nav-item.active, .nav-item:hover { 
    background: var(--input-focus); 
    color: var(--accent-pink); 
}

/* --- MAIN CONTENT PANEL --- */
.main-glass {
    flex: 1; 
    background: var(--glass-bg); 
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px); 
    border: 1px solid var(--glass-border);
    border-radius: 32px; 
    padding: 40px; 
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}

.main-glass::-webkit-scrollbar { display: none; }

/* --- HEADER --- */
header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 40px; 
}

h1 { 
    margin: 0; 
    font-weight: 600; 
    font-size: 28px; 
}

p { 
    margin: 5px 0 0 0; 
    color: var(--text-muted); 
    font-size: 14px; 
}

.points-board { 
    display: flex; 
    gap: 10px; 
}

.point-pill { 
    background: var(--input-bg); 
    border: 1px solid; 
    border-radius: 20px; 
    padding: 6px 14px; 
    font-size: 13px; 
    font-weight: 500; 
}

/* --- INPUTS & DASHBOARD --- */
.name-edit {
    background: transparent; 
    border: none; 
    color: white; 
    font-family: var(--font-main);
    font-weight: 700; 
    font-size: 14px; 
    text-transform: uppercase; 
    width: 150px;
    cursor: pointer; 
    padding: 0; 
    border-bottom: 1px dashed rgba(255,255,255,0.2);
}

.name-edit:focus { 
    outline: none; 
    border-bottom: 1px solid white; 
}

.input-dashboard { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 30px; 
    margin-bottom: 40px; 
}

.section-title { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 20px; 
}

.idea-row { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 12px; 
}

input {
    background: var(--input-bg); 
    border: 1px solid transparent; 
    border-radius: 12px;
    padding: 14px 16px; 
    color: white; 
    font-family: var(--font-main); 
    font-size: 14px;
    outline: none; 
    transition: 0.2s ease;
}

input:focus { 
    background: var(--input-focus); 
    box-shadow: 0 0 0 4px rgba(255,255,255,0.05); 
}

input[type="text"] { flex: 1; }
input[type="number"] { width: 80px; text-align: center; }

/* --- BUTTONS --- */
.action-area { 
    text-align: center; 
    margin-bottom: 50px; 
}

button#generateBtn {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53); 
    color: white; 
    border: none;
    padding: 16px 40px; 
    font-size: 16px; 
    font-weight: 600; 
    border-radius: 100px;
    cursor: pointer; 
    box-shadow: 0 10px 30px var(--accent-glow);
    display: inline-flex; 
    align-items: center; 
    gap: 10px; 
    transition: 0.2s;
}

button#generateBtn:hover { transform: translateY(-2px); }

/* --- CARDS & GRID --- */
.cards-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px; 
}

.date-card {
    background: rgba(30, 30, 35, 0.6); 
    border-radius: 20px; 
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.05); 
    position: relative; 
    overflow: hidden; 
    transition: 0.3s;
}

.date-card:hover { 
    transform: translateY(-5px); 
    background: rgba(40, 40, 45, 0.8); 
}

.date-card::before { 
    content: ''; 
    position: absolute; 
    left: 0; 
    top: 0; 
    bottom: 0; 
    width: 6px; 
    background: var(--accent-pink); 
    z-index: 2;
}

.card-top { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 15px; 
}

.date-badge { 
    background: rgba(255, 107, 107, 0.15); 
    color: var(--accent-pink); 
    padding: 6px 12px; 
    border-radius: 8px; 
    font-size: 12px; 
    font-weight: 600; 
}

.cost-display { font-weight: 600; }

.suggester { 
    font-size: 13px; 
    color: var(--text-muted); 
    margin-bottom: 15px; 
}

/* --- ACTION BUTTONS --- */
.action-row { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 15px; 
}

.icon-btn {
    flex: 1; 
    border: none; 
    padding: 8px; 
    border-radius: 8px; 
    cursor: pointer; 
    font-size: 12px; 
    font-weight: 600;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 5px; 
    transition: 0.2s;
    background: rgba(255,255,255,0.05); 
    color: var(--text-muted);
}

.icon-btn:hover { 
    background: rgba(255,255,255,0.1); 
    color: white; 
}

.veto-btn { background: rgba(255, 80, 80, 0.1); color: #ff5050; }
.veto-btn:hover { background: rgba(255, 80, 80, 0.3); }
.complete-btn { background: rgba(80, 255, 120, 0.1); color: #50ff78; }
.complete-btn:hover { background: rgba(80, 255, 120, 0.3); }

.upload-btn {
    width: 100%; 
    background: rgba(255,255,255,0.05); 
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 12px; 
    padding: 10px; 
    color: var(--text-muted); 
    font-size: 13px; 
    cursor: pointer;
    text-align: center; 
    display: block; 
    box-sizing: border-box;
}

.memory-img { 
    width: 100%; 
    border-radius: 12px; 
    margin-top: 15px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
}

/* --- SHOP & STATS --- */
.rules-card { 
    background: rgba(255,255,255,0.03); 
    border-radius: 16px; 
    padding: 20px; 
    margin-bottom: 30px; 
}

.rules-card h3 { 
    margin-top: 0; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    color: var(--accent-pink); 
}

.rules-card ul { 
    padding-left: 20px; 
    color: var(--text-muted); 
    line-height: 1.8; 
    font-size: 14px; 
}

.earn-grid { 
    display: flex; 
    gap: 15px; 
    margin-bottom: 30px; 
    flex-wrap: wrap; 
}

.earn-card {
    flex: 1; 
    min-width: 150px; 
    background: rgba(255,255,255,0.05); 
    border-radius: 12px; 
    padding: 15px;
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    text-align: center;
}

.earn-btns { 
    display: flex; 
    background: rgba(0,0,0,0.2); 
    border-radius: 8px; 
    padding: 5px; 
}

.earn-btns span { 
    flex: 1; 
    cursor: pointer; 
    font-size: 12px; 
    font-weight: 600; 
    padding: 4px; 
    border-radius: 4px; 
    transition: 0.2s; 
}

.earn-btns span:hover { 
    background: rgba(255,255,255,0.1); 
    color: var(--accent-pink); 
}

.divider { 
    width: 1px; 
    background: rgba(255,255,255,0.1); 
    margin: 0 5px; 
}

.shop-card { text-align: center; border-color: rgba(255, 215, 0, 0.2); }
.shop-card::before { background: var(--accent-gold); }
.shop-card h3 { font-size: 18px; margin: 10px 0; }

.cost-tag { 
    display: inline-block; 
    background: rgba(255, 215, 0, 0.1); 
    color: var(--accent-gold); 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 12px; 
    font-weight: 600; 
}

.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px; 
    margin-bottom: 30px; 
}

.stat-card { 
    background: rgba(255,255,255,0.03); 
    border-radius: 16px; 
    padding: 20px; 
    text-align: center; 
    border: 1px solid rgba(255,255,255,0.05); 
}

.stat-icon { 
    font-size: 24px; 
    color: var(--accent-pink); 
    margin-bottom: 10px; 
}

.section-header { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 25px; 
    color: var(--text-muted); 
    font-weight: 500; 
}

.line { 
    flex: 1; 
    height: 1px; 
    background: rgba(255,255,255,0.1); 
}

/* --- MOBILE RESPONSIVENESS (SCROLL FIX & CARD THEME) --- */
@media screen and (max-width: 900px) {

    /* 1. FORCE SCROLLING ON MOBILE */
    html, body {
        overflow-y: auto !important; /* Forces scrollbar */
        -webkit-overflow-scrolling: touch;
        background-color: #0f0f13;
        height: auto !important;
        min-height: 100%;
        position: static !important;
        /* Fix notch cutting off content */
        padding-top: env(safe-area-inset-top);
    }

    .app-container {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 100vh;
        padding: 20px !important;
        /* Extra padding so floating nav doesn't cover content */
        padding-bottom: 140px !important; 
        margin: 0 !important;
        border: none !important;
        border-radius: 0 !important;
    }

    /* 2. HEADER */
    header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px;
        margin-bottom: 30px !important;
        padding: 10px 5px;
    }

    h1 {
        font-size: 28px !important;
        margin: 0 !important;
        text-align: left !important;
        line-height: 1.2;
    }

    p {
        text-align: left !important;
        opacity: 0.7;
        font-size: 14px !important;
    }

    .points-board {
        width: 100%;
        margin-top: 10px;
        justify-content: flex-start !important;
        gap: 15px !important;
    }

    .point-pill {
        background: rgba(255, 255, 255, 0.1) !important;
        border: none !important;
        backdrop-filter: blur(10px);
        font-weight: 600;
        padding: 10px 18px !important;
    }

    /* 3. INPUT CARDS (Solid Style) */
    .input-dashboard {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
    }

    .panel-section {
        background: #1c1c21 !important; 
        border: 1px solid rgba(255,255,255,0.08) !important;
        border-radius: 24px !important;
        padding: 24px !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
        margin: 0 !important;
    }

    .section-title {
        font-size: 13px !important;
        color: #8b8b9b !important;
        letter-spacing: 1px;
        margin-bottom: 20px !important;
        text-transform: uppercase;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .name-edit {
        color: white !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        border-bottom: none !important;
        text-transform: none !important;
        width: auto !important;
    }

    /* 4. INPUTS - FIXED GRID TO PREVENT CUT-OFF */
    .idea-row {
        display: grid !important;
        grid-template-columns: 1fr 70px !important; 
        gap: 12px !important;
        margin-bottom: 12px !important;
    }

    input {
        background: #2a2a30 !important;
        border: none !important;
        color: white !important;
        font-size: 16px !important;
        padding: 16px !important;
        border-radius: 14px !important;
        font-weight: 500;
        width: 100% !important;
    }
    
    input[type="number"] {
        text-align: center;
        padding: 16px 5px !important;
    }
    
    input:focus {
        background: #3a3a42 !important;
        box-shadow: inset 0 0 0 2px var(--accent-pink) !important;
    }

    /* 5. FLOATING BOTTOM NAV */
    .sidebar {
        position: fixed !important;
        bottom: 30px !important;
        left: 20px !important;
        right: 20px !important;
        width: auto !important;
        height: 70px !important;
        background: rgba(20, 20, 25, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255,255,255,0.15) !important;
        border-radius: 35px !important;
        flex-direction: row !important;
        justify-content: space-evenly !important;
        align-items: center !important;
        z-index: 9999 !important;
        padding: 0 !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    }

    .logo-area { display: none !important; }

    .nav-item {
        width: 50px !important;
        height: 50px !important;
        margin: 0 !important;
        background: transparent !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50%;
    }
    
    .nav-item i {
        font-size: 24px !important;
        color: #666;
        transition: 0.3s;
    }
    
    .nav-item.active { background: rgba(255, 107, 107, 0.15) !important; }
    .nav-item.active i { color: var(--accent-pink) !important; }

    /* 6. CONTENT & ACTIONS */
    .main-glass {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .action-area {
        margin-top: 30px !important;
        margin-bottom: 50px !important;
    }

    button#generateBtn {
        width: 100% !important;
        padding: 22px !important;
        font-size: 18px !important;
        border-radius: 20px !important;
        background: linear-gradient(135deg, #FF6B6B, #FF8E53) !important;
        box-shadow: 0 10px 40px rgba(255, 107, 107, 0.4) !important;
    }

    .cards-grid, .shop-container, .stats-grid, .earn-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .date-card {
        background: #1c1c21 !important;
        border: 1px solid rgba(255,255,255,0.05) !important;
        overflow: hidden !important; 
    }
    
    .ph-ghost { color: rgba(255,255,255,0.2) !important; }
}