/* ============================================
   CALCULADORA DE COMBUSTÍVEL - AUTOMOTIVAS
   Tema: Laranja Automotivo (#ff6b35)
   Design: Glassmorphism Premium
   ============================================ */

:root {
    /* Cores Primárias Automotivas */
    --primary-color: #ff6b35;
    --primary-dark: #e85a28;
    --primary-light: #ff8555;
    
    /* Cores Secundárias */
    --secondary-color: #ffa500;
    --accent-color: #ffcc00;
    
    /* Cores de Resultado */
    --ethanol-color: #10b981;
    --gasoline-color: #3b82f6;
    --neutral-color: #6b7280;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: rgba(0, 0, 0, 0.1);
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #ff6b35 0%, #ffa500 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 107, 53, 0.05) 0%, rgba(255, 165, 0, 0.05) 100%);
}

/* ============================================
   BACKGROUND E LAYOUT GERAL
   ============================================ */

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 165, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER E TÍTULO
   ============================================ */

.page-header {
    text-align: center;
    padding: 3rem 0 2rem;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
}

.page-header .lead {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   ÍCONE DE COMBUSTÍVEL ANIMADO
   ============================================ */

.fuel-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: fuelPump 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.5));
}

@keyframes fuelPump {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

/* ============================================
   CARDS GLASSMORPHISM
   ============================================ */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px var(--glass-shadow);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.3);
}

.glass-card h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.glass-card h2 i {
    font-size: 1.5rem;
}

/* ============================================
   FORMULÁRIO
   ============================================ */

.form-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: var(--primary-color);
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
    color: #fff;
    outline: none;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-group-text {
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.3);
    color: var(--primary-light);
    border-radius: 12px;
    font-weight: 500;
}

/* ============================================
   BOTÕES
   ============================================ */

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    background: linear-gradient(135deg, #e85a28 0%, #ff8c00 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-light);
}

/* ============================================
   INFO BOX (70% RULE)
   ============================================ */

.info-box {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(255, 165, 0, 0.15) 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.info-box h5 {
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-box p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    line-height: 1.6;
}

/* ============================================
   SEÇÃO DE RESULTADOS
   ============================================ */

#resultSection {
    display: none;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card de Recomendação */
.recommendation-card {
    background: var(--gradient-card);
    border: 2px solid;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.recommendation-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.recommendation-card.ethanol {
    border-color: var(--ethanol-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.recommendation-card.gasoline {
    border-color: var(--gasoline-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.recommendation-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.recommendation-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.recommendation-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.ratio-display {
    font-size: 3rem;
    font-weight: 800;
    margin: 1rem 0;
    text-shadow: 0 0 20px currentColor;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
}

.stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

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

.stat-unit {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.comparison-table th {
    color: var(--primary-light);
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 8px;
}

.comparison-table td {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table tr:first-child td {
    border-top: none;
}

.fuel-type {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fuel-type.ethanol {
    color: var(--ethanol-color);
}

.fuel-type.gasoline {
    color: var(--gasoline-color);
}

/* Savings Highlight */
.savings-highlight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 2px solid var(--ethanol-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1.5rem;
}

.savings-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--ethanol-color);
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.savings-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Trip Stats */
.trip-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.trip-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

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

/* Result Card */
.result-card {
    background: var(--gradient-card);
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.result-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */

.accordion-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-button {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 600;
    padding: 1.25rem;
    border: none;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background: rgba(255, 107, 53, 0.2);
    color: var(--primary-light);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
    border-color: var(--primary-color);
}

.accordion-button::after {
    filter: brightness(0) invert(1);
}

.accordion-body {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    line-height: 1.6;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header .lead {
        font-size: 1rem;
    }
    
    .fuel-icon {
        font-size: 3rem;
    }
    
    .glass-card {
        padding: 1.5rem;
    }
    
    .glass-card h2 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .recommendation-title {
        font-size: 1.5rem;
    }
    
    .ratio-display {
        font-size: 2rem;
    }
    
    .savings-amount {
        font-size: 2rem;
    }
    
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    .btn-primary {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

/* ============================================
   UTILITÁRIOS
   ============================================ */

.text-ethanol {
    color: var(--ethanol-color);
}

.text-gasoline {
    color: var(--gasoline-color);
}

.text-primary-custom {
    color: var(--primary-color);
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

/* Efeito de brilho para valores importantes */
.glow {
    text-shadow: 0 0 10px currentColor;
}

/* Animação de entrada suave */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
