/* 🔥 RESET E CONFIGURAÇÕES GERAIS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 🎨 PALETA DE CORES VIBRANTES */
    --primary-blue: #1a237e;
    --primary-orange: #ff6d00;
    --primary-green: #4CAF50;
    --success-green: #45a049;
    --warning-yellow: #ffc107;
    --danger-red: #ff3d00;
    
    /* 🎨 CORES NEUTRAS */
    --white: #ffffff;
    --black: #000000;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #adb5bd;
    --gray-500: #6c757d;
    
    /* 🎨 SOMBRAS */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    
    /* 🎨 BORDAS */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* 🔥 FUNDO COLORIDO E MODERNO */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    line-height: 1.6;
}

/* 🔥 CONTAINER PRINCIPAL */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 🔥 HEADER COLORIDO */
.main-header {
    background: linear-gradient(135deg, var(--primary-blue), #283593);
    padding: 15px 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-orange);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 🔥 LOGO ATRAENTE */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    background: var(--primary-orange);
    padding: 8px;
    border-radius: 50%;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo-text {
    font-weight: 800;
    color: var(--white) !important;
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.highlight {
    color: var(--primary-orange) !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* 🔥 ESTATÍSTICAS DO HEADER */
.header-stats {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat {
    text-align: center;
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.stat-number {
    font-weight: 800;
    color: var(--white);
    font-size: 18px;
    display: block;
}

.stat-label {
    color: var(--gray-200);
    font-size: 12px;
    font-weight: 600;
}

/* 🔥 BADGE DE LOCALIZAÇÃO */
.location-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    color: var(--white);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.location-badge:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* 🔥 BANNER URGENTE */
.urgent-banner {
    background: linear-gradient(135deg, var(--danger-red), var(--primary-orange));
    color: var(--white);
    padding: 12px 0;
    text-align: center;
    font-weight: 800;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    box-shadow: var(--shadow-md);
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 🔥 CONTEÚDO PRINCIPAL */
.hero-section {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* 🔥 ALERTA URGENTE */
.urgent-alert {
    background: linear-gradient(135deg, var(--warning-yellow), #ffb300);
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-lg);
    border: 2px solid #ffa000;
}

.alert-icon {
    font-size: 32px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.alert-content h3 {
    color: #d84315;
    font-weight: 800;
    margin-bottom: 5px;
    font-size: 16px;
}

.alert-content p {
    color: #5d4037;
    font-weight: 600;
    font-size: 14px;
}

/* 🔥 BOTÃO DE FILTRO */
.filter-button-container {
    margin: 20px 0;
}

.filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 25px;
    background: linear-gradient(135deg, var(--primary-green), var(--success-green));
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 800;
    font-size: 16px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3);
}

.filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

/* 🔥 DESTAQUE DO FRETE PRINCIPAL */
.frete-highlight {
    background: linear-gradient(135deg, var(--white), #f8f9fa);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin: 25px 0;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border: 3px solid var(--primary-orange);
    position: relative;
    overflow: hidden;
}

.frete-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange), var(--danger-red));
}

.frete-badge {
    background: linear-gradient(135deg, var(--danger-red), var(--primary-orange));
    color: var(--white);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 🔥 ROTA DO FRETE */
.frete-route {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    font-size: 20px;
    font-weight: 700;
}

.from, .to {
    background: var(--primary-blue);
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.arrow {
    color: var(--primary-orange);
    font-size: 24px;
    animation: move 2s infinite;
}

@keyframes move {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* 🔥 PREÇO DESTAQUE */
.frete-price {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--primary-green);
}

.currency {
    font-size: 24px;
    color: var(--primary-green);
    font-weight: 700;
}

.amount {
    font-size: 42px;
    font-weight: 900;
    color: var(--primary-green);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin: 0 5px;
}

.decimal {
    font-size: 24px;
    color: var(--primary-green);
    font-weight: 700;
}

/* 🔥 DETALHES DO FRETE */
.frete-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--gray-100);
    padding: 15px;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--primary-blue);
    border: 1px solid var(--gray-300);
}

.detail .icon {
    font-size: 20px;
}

/* 🔥 COUNTDOWN TIMER */
.countdown-timer {
    background: linear-gradient(135deg, var(--primary-blue), #303f9f);
    color: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin: 25px 0;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--primary-orange);
}

.timer-icon {
    font-size: 24px;
    margin-bottom: 10px;
    animation: spin 2s infinite;
}

@keyframes spin {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.timer-text {
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 16px;
}

.timer-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
}

.time-unit {
    background: rgba(255,255,255,0.2);
    padding: 10px 15px;
    border-radius: var(--radius-md);
    min-width: 80px;
}

.number {
    font-size: 32px;
    display: block;
}

.label {
    font-size: 12px;
    opacity: 0.8;
    display: block;
}

.time-separator {
    color: var(--primary-orange);
    font-weight: 900;
}

/* 🔥 BOTÃO CTA PRINCIPAL */
.cta-button {
    display: block;
    background: linear-gradient(135deg, var(--primary-green), var(--success-green));
    color: var(--white);
    text-decoration: none;
    padding: 25px;
    border-radius: var(--radius-lg);
    text-align: center;
    font-weight: 800;
    font-size: 20px;
    margin: 25px 0;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(76, 175, 80, 0.6);
}

.btn-icon {
    font-size: 24px;
    margin-right: 10px;
}

.btn-badge {
    background: var(--primary-orange);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 18px;
    margin-left: 10px;
}

/* 🔥 BOTÃO ALTERAR LOCALIZAÇÃO */
.change-location-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    border: 2px solid var(--gray-300);
    padding: 15px;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    margin: 15px 0;
    color: var(--primary-blue);
    transition: all 0.3s ease;
}

.change-location-btn:hover {
    background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
    border-color: var(--primary-blue);
}

/* 🔥 FEED DE FRETES EM TEMPO REAL */
.live-freights {
    background: linear-gradient(135deg, var(--white), #f8f9fa);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin: 25px 0;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--primary-blue);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-weight: 800;
    color: var(--primary-blue);
    font-size: 18px;
}

.title-icon {
    font-size: 24px;
    animation: blink 2s infinite;
}

.freights-feed {
    max-height: 300px;
    overflow-y: auto;
}

.freight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-green);
    transition: all 0.3s ease;
}

.freight-item:hover {
    background: var(--gray-200);
    transform: translateX(5px);
}

.freight-route {
    font-weight: 600;
    color: var(--primary-blue);
}

.freight-price {
    font-weight: 800;
    color: var(--primary-green);
    background: rgba(76, 175, 80, 0.1);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
}

/* 🔥 GRID DE ESTATÍSTICAS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 25px 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--white), #f8f9fa);
    padding: 25px 15px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-orange));
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.stat-content {
    position: relative;
    z-index: 2;
}

.stat-number {
    font-weight: 900;
    color: var(--primary-blue);
    font-size: 24px;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--gray-500);
    font-weight: 600;
    font-size: 14px;
}

/* 🔥 MODAIS */
.location-modal,
.city-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, var(--white), #f8f9fa);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--primary-orange);
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange), var(--danger-red));
}

.modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
    animation: bounce 2s infinite;
}

.modal-content h3 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-weight: 800;
    font-size: 22px;
}

.modal-content p {
    color: var(--gray-500);
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--success-green));
    color: var(--white);
    border: none;
    padding: 18px 25px;
    border-radius: var(--radius-md);
    font-weight: 800;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    color: var(--primary-blue);
    border: 2px solid var(--gray-300);
    padding: 18px 25px;
    border-radius: var(--radius-md);
    font-weight: 800;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
    border-color: var(--primary-blue);
}

.mobile-tip {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: var(--primary-blue);
    padding: 15px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #90caf9;
    margin-top: 20px;
}

/* 🔥 SEARCH CONTAINER */
.search-container {
    position: relative;
    margin: 20px 0;
}

.search-container input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 16px;
    background: var(--white);
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.cities-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-lg);
}

.city-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--primary-blue);
}

.city-item:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.city-item:last-child {
    border-bottom: none;
}

.search-loading, .search-message {
    padding: 20px;
    text-align: center;
    color: var(--gray-500);
    font-style: italic;
}

/* 🔥 NOTIFICAÇÕES EM TEMPO REAL */
.live-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-green), var(--success-green));
    color: var(--white);
    padding: 15px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1500;
    animation: slideInRight 0.5s ease-out;
    max-width: 320px;
    font-size: 14px;
    border-left: 4px solid var(--success-green);
    backdrop-filter: blur(10px);
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification-icon {
    margin-right: 10px;
    font-size: 16px;
}

/* 🔥 RODAPÉ MINIMALISTA */
.minimal-footer {
    background: linear-gradient(135deg, var(--primary-blue), #283593);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
    border-top: 3px solid var(--primary-orange);
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
    margin-bottom: 10px;
}

.footer-tagline {
    color: var(--gray-200);
    font-size: 14px;
    margin-bottom: 15px;
}

.footer-copyright {
    color: var(--gray-300);
    font-size: 12px;
}

/* 🔥 ANIMAÇÕES DE ESTATÍSTICAS */
.stat-number.changing {
    color: var(--primary-orange);
    transform: scale(1.2);
}

/* 🔥 RESPONSIVIDADE */
@media (max-width: 768px) {
    .hero-section {
        padding: 15px;
    }
    
    .frete-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .frete-route {
        flex-direction: column;
        gap: 10px;
    }
    
    .timer-display {
        font-size: 20px;
    }
    
    .amount {
        font-size: 36px;
    }
    
    .main-header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-stats {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 30px 20px;
    }
    
    .frete-highlight {
        padding: 20px 15px;
    }
    
    .cta-button {
        padding: 20px 15px;
        font-size: 18px;
    }
    
    .live-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* 🔥 SCROLLBAR PERSONALIZADA */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-orange));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-blue));
}