@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --secondary: #06b6d4;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #f43f5e;
    --success: #10b981;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --sidebar-width: 280px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    width: 100%;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR - Desktop Only */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    border-right: 1px solid var(--glass-border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1; /* Faz a navegação ocupar o espaço e empurrar o Sair */
    margin-top: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(5px);
}

.nav-item:hover i {
    color: var(--primary);
    filter: drop-shadow(0 0 5px var(--primary));
}

.nav-item.active {
    background: linear-gradient(to right, rgba(139, 92, 246, 0.15), transparent);
    color: white;
    border-left: 3px solid var(--primary);
}

.nav-item.active i {
    color: var(--primary);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span { color: var(--primary); }

.user-profile {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 1rem;
}

.level-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.level-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 65%;
    box-shadow: 0 0 10px var(--primary);
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    width: 100%;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

/* HERO SECTION */
.hero-section {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.4), rgba(139, 92, 246, 0.2)), url('assets/img/hero-bg.png');
    background-size: cover;
    background-position: center;
    border-radius: 2rem;
    padding: 3rem 2rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(2px);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content h1 span {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.btn-secondary {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.search-bar {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 1.2rem;
    padding: 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    transition: all 0.3s;
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.search-bar input {
    background: none;
    border: none;
    color: var(--text-main);
    width: 100%;
    outline: none;
}

.btn-post {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    cursor: pointer;
}

/* FILTERS CAROUSEL */
.filters-container {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 0.5rem 0;
    margin-bottom: 2rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.filters-container::-webkit-scrollbar { display: none; }

.filter-pill {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
}

.filter-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* DEALS GRID */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.deal-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
}

/* OFERTAS IMPULSIONADAS (PREMIUM) */
.deal-card.sponsored {
    border: 2px solid #fbbf24;
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.2), inset 0 0 15px rgba(251, 191, 36, 0.05);
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2s infinite ease-in-out;
}

.deal-card.sponsored::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(251, 191, 36, 0.15) 50%,
        transparent 55%
    );
    animation: shimmer 5s infinite linear;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translate(-30%, -30%) rotate(0deg); }
    100% { transform: translate(30%, 30%) rotate(0deg); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.2); }
    50% { box-shadow: 0 0 35px rgba(251, 191, 36, 0.4); }
}

.sponsored-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #451a03;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deal-image {
    width: 100%;
    height: 200px;
    background: #fff;
    position: relative;
}

.deal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.discount-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 0.8rem;
    font-weight: 700;
}

.deal-content { padding: 1.5rem; }

.price-row {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.price { font-size: 1.5rem; font-weight: 700; color: var(--text-main); }
.old-price { color: var(--text-muted); text-decoration: line-through; margin-left: 0.8rem; font-size: 0.95rem; }

.deal-footer {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.2rem;
    margin-top: 0.5rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.voting {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--glass);
    padding: 0.5rem 1rem;
    border-radius: 0.8rem;
}

.vote-btn { cursor: pointer; color: var(--text-muted); transition: all 0.2s; }
.vote-btn:hover { transform: scale(1.2); }
.vote-count { font-weight: 800; font-size: 1.1rem; }

/* Temperatura das Ofertas */
.deal-hot { color: #ff4500 !important; text-shadow: 0 0 10px rgba(255, 69, 0, 0.3); }
.deal-cold { color: #00bfff !important; text-shadow: 0 0 10px rgba(0, 191, 255, 0.3); }

.card-hot { border-color: rgba(255, 69, 0, 0.4) !important; box-shadow: 0 0 15px rgba(255, 69, 0, 0.1); }
.card-cold { border-color: rgba(0, 191, 255, 0.4) !important; box-shadow: 0 0 15px rgba(0, 191, 255, 0.1); }

.btn-view {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-view:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* ADS */
.ad-container {
    background: var(--bg-card);
    border: 1px dashed var(--glass-border);
    border-radius: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    padding: 1rem;
    position: relative;
}

.ad-label { position: absolute; top: 5px; left: 10px; font-size: 0.6rem; color: var(--text-muted); }
.ad-placeholder { color: var(--text-muted); min-height: 50px; display: flex; align-items: center; justify-content: center; }

/* MOBILE NAVIGATION */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border-top: 1px solid var(--glass-border);
    padding: 0.8rem;
    justify-content: space-around;
    z-index: 1000;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
}

.nav-fab {
    background: var(--primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -30px;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.bottom-sticky-ad {
    display: none;
    position: fixed;
    bottom: 65px;
    left: 0;
    width: 100%;
    z-index: 999;
    background: var(--bg-card);
    border-top: 1px solid var(--glass-border);
}

/* FORMULÁRIO DE POSTAGEM - RESPONSIVO */
@media (max-width: 500px) {
    #modal-post .modal-body-flex {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    #modal-post input {
        font-size: 16px !important; /* Evita zoom no iPhone */
    }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .sidebar { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 1rem; padding-bottom: 100px; }
    .bottom-nav { display: flex !important; }
    .bottom-sticky-ad { display: flex !important; }
    .desktop-only { display: none !important; }
    
    .deals-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1025px) {
    .bottom-nav { display: none !important; }
    .sidebar { display: flex !important; }
}
