:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #10b981;
    --primary-hover: #059669;
    --accent: #3b82f6;
    
    /* Ratings */
    --rating-baixo: #10b981;
    --rating-medio: #f59e0b;
    --rating-alto: #f97316;
    --rating-critico: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Dynamic Background */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 15% 50%, rgba(16, 185, 129, 0.15), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.15), transparent 25%);
    z-index: -1;
    animation: pulse 15s infinite alternate;
}

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

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #34d399, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo .icon {
    font-size: 2.5rem;
}

.header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Calculator Form */
.calculator-card {
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.tooltip-icon {
    cursor: help;
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

input[type="number"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Checkbox Style */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.checkbox-group label {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Button */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-icon {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

/* Results Section */
.results-section {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.results-section.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.eco-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.result-card h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 500;
}

.value-large {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.value-large .unit {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
}

.highlight-card .subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Rating Bar */
.rating-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.rating-bar {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s ease;
}

.rating-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Colors for Ratings */
.rating-baixo { background-color: var(--rating-baixo); color: var(--rating-baixo); }
.rating-medio { background-color: var(--rating-medio); color: var(--rating-medio); }
.rating-alto { background-color: var(--rating-alto); color: var(--rating-alto); }
.rating-critico { background-color: var(--rating-critico); color: var(--rating-critico); }

/* Equivalences List */
.equivalences-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.equivalences-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.4);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.equivalences-list li:hover {
    transform: translateX(4px);
    background: rgba(15, 23, 42, 0.6);
}

.eq-icon {
    font-size: 1.5rem;
}

.eq-text {
    font-size: 0.9rem;
    color: var(--text-main);
}

.eq-text strong {
    color: #fff;
    font-weight: 600;
}

/* Alternatives */
.mt-4 { margin-top: 1.5rem; }

.alternatives-container h3 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.alternatives-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.alt-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.alt-card:hover {
    transform: translateY(-4px);
    border-color: rgba(52, 211, 153, 0.5);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

.alt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.alt-mode {
    font-weight: 600;
    color: #fff;
    font-size: 1.05rem;
}

.alt-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.alt-co2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.alt-viability {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Responsive */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}
