:root {
    --bg: #F8F9FA;
    --card: #ffffff;
    --text: #1a1a1a;
    --primary: #E63946;
    --accent: #FFEBEC;
    --border: #eeeeee;
    --shadow: 0 8px 30px rgba(0,0,0,0.04);
}

.dark-mode {
    --bg: #121212;
    --card: #1e1e1e;
    --text: #ffffff;
    --accent: #333333;
    --border: #333333;
    --shadow: 0 8px 30px rgba(0,0,0,0.3);
}

* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    transition: background 0.3s ease;
    line-height: 1.5;
    padding-bottom: 110px;
}

/* --- HEADER --- */
.app-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.logo-text { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.5px; text-transform: uppercase; }
.logo-text span { color: var(--primary); }

.theme-btn {
    background: var(--accent);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    color: var(--primary);
}

.app-content { padding: 20px; max-width: 600px; margin: 0 auto; }

/* --- TRAFIC --- */
.traffic-card {
    background: var(--card);
    padding: 20px;
    border-radius: 24px;
    border: 1px solid var(--border);
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

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

.live-dot {
    width: 8px; height: 8px; background: #2ECC71;
    border-radius: 50%; display: inline-block; margin-right: 5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.chart-container {
    display: flex; align-items: flex-end; justify-content: space-between;
    height: 80px; gap: 4px; padding-top: 10px;
}

.bar { flex: 1; background: var(--accent); border-radius: 4px 4px 2px 2px; transition: all 0.5s ease; position: relative; min-height: 4px; }
.bar.active { background: var(--primary); box-shadow: 0 0 12px rgba(230, 57, 70, 0.4); }

/* --- WELCOME & CARDS --- */
.welcome-section { margin: 15px 0 25px 0; }
.welcome-section h1 { font-size: 1.7rem; font-weight: 800; }
.welcome-section p { opacity: 0.6; font-size: 0.95rem; }

.section-header h2 { font-size: 1rem; font-weight: 700; text-transform: uppercase; color: var(--primary); letter-spacing: 0.5px; }

.pricing-scroll { 
    display: flex; overflow-x: auto; gap: 15px; padding: 5px 5px 20px 5px; 
    margin: 0 -20px; padding-left: 20px; scrollbar-width: none; 
}
.pricing-scroll::-webkit-scrollbar { display: none; }

.app-card { min-width: 170px; background: var(--card); padding: 25px 20px; border-radius: 24px; box-shadow: var(--shadow); border: 1px solid var(--border); text-align: center; }
.badge { font-size: 0.65rem; background: var(--accent); color: var(--primary); padding: 4px 12px; border-radius: 20px; font-weight: 700; text-transform: uppercase; }
.price-tag { font-size: 1.8rem; font-weight: 800; margin-top: 15px; }
.price-tag span { font-size: 0.8rem; opacity: 0.5; font-weight: 400; }

.info-grid { display: grid; grid-template-columns: 1fr; gap: 15px; margin-top: 10px; }
.glass-card { background: var(--card); padding: 20px; border-radius: 24px; border: 1px solid var(--border); }
.glass-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; text-transform: uppercase; color: var(--primary); }

.social-row { display: flex; gap: 15px; margin-top: 15px; }
.social-link { font-size: 1.7rem; text-decoration: none; }
.social-link.fb { color: #1877F2; }
.social-link.ig { color: #E4405F; }

/* --- CHAT WIDGET (CORECTAT) --- */
.chat-fab {
    position: fixed; bottom: 95px; right: 20px; width: 56px; height: 56px;
    background: var(--primary); 
    color: #ffffff !important; /* Forțăm alb pentru iconiță */
    border-radius: 50%; border: none;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4); z-index: 1001; cursor: pointer;
    transition: all 0.3s; font-size: 1.4rem; display: flex; align-items: center; justify-content: center;
}

/* Când chat-ul e activ, inversăm culorile dar evităm dispariția pe Dark Mode */
.chat-fab.active { 
    transform: rotate(90deg); 
    background: var(--text); 
    color: var(--bg) !important; /* Iconița ia culoarea fundalului pentru contrast maxim */
}

.chat-window {
    position: fixed; bottom: 165px; right: 20px; width: 320px; max-width: calc(100vw - 40px);
    background: var(--card); border-radius: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid var(--border); z-index: 1001; display: flex; flex-direction: column;
    overflow: hidden; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.chat-window.hidden { opacity: 0; transform: translateY(20px) scale(0.9); pointer-events: none; }

.chat-header { background: var(--primary); padding: 15px; color: white; display: flex; justify-content: space-between; align-items: center; }
.chat-header-info { display: flex; align-items: center; gap: 10px; }
.chat-avatar { width: 35px; height: 35px; background: rgba(255,255,255,0.2); border-radius: 50%; display: grid; place-items: center; }
.chat-header h4 { font-size: 0.9rem; margin: 0; color: white; }
#close-chat { background: none; border: none; color: white; cursor: pointer; }

.chat-body { height: 250px; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.message { padding: 10px 14px; border-radius: 15px; font-size: 0.85rem; max-width: 85%; }
.message.bot { background: var(--card); color: var(--text); align-self: flex-start; border-bottom-left-radius: 2px; border: 1px solid var(--border); }
.message.user { background: var(--primary); color: white; align-self: flex-end; border-bottom-right-radius: 2px; }

.chat-footer { padding: 10px; background: var(--card); border-top: 1px solid var(--border); }
.quick-replies { display: flex; flex-wrap: wrap; gap: 5px; }
.quick-replies button {
    background: var(--accent); color: var(--primary); border: 1px solid var(--primary);
    padding: 6px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; cursor: pointer;
}

/* --- MODAL --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center; z-index: 2000; padding: 20px;
}
.modal-content { background: var(--card); padding: 30px; border-radius: 32px; max-width: 400px; text-align: center; border: 1px solid var(--border); animation: modalSlide 0.4s; }
@keyframes modalSlide { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-icon { font-size: 3.5rem; color: var(--primary); margin-bottom: 15px; }
.modal-btn { background: var(--primary); color: white; border: none; padding: 14px; border-radius: 16px; font-weight: 700; width: 100%; cursor: pointer; margin-top: 15px; }

/* --- NAV --- */
.bottom-nav { 
    position: fixed; bottom: 0; left: 0; right: 0; height: 75px; background: var(--card); 
    display: flex; justify-content: space-around; align-items: center; border-top: 1px solid var(--border); z-index: 1000; 
}
.nav-item { flex: 1; text-decoration: none; color: var(--text); display: flex; flex-direction: column; align-items: center; opacity: 0.4; }
.nav-item.active { opacity: 1; color: var(--primary); }
.nav-item i { font-size: 1.2rem; margin-bottom: 4px; }
.nav-item small { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; }

.nav-logo-central { flex: 1; display: flex; justify-content: center; position: relative; top: -15px; }
.logo-circle { 
    width: 68px; height: 68px; background: var(--primary); border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; color: white;
    box-shadow: 0 5px 20px rgba(230, 57, 70, 0.5); border: 5px solid var(--bg);
}

@media (min-width: 768px) { .info-grid { grid-template-columns: 1fr 1fr; } }