:root {
    color-scheme: dark;
    /* Colors */
    --bg-color: #050505;
    --card-bg: rgba(20, 20, 25, 0.8);
    --accent-blue: #00f3ff;
    --accent-purple: #bc13fe;
    --accent-green: #39ff14;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;

    /* Effects */
    --neon-glow-blue: 0 0 10px rgba(0, 243, 255, 0.5), 0 0 20px rgba(0, 243, 255, 0.3);
    --neon-glow-purple: 0 0 10px rgba(188, 19, 254, 0.5), 0 0 20px rgba(188, 19, 254, 0.3);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);

    /* Spacing */
    --radius-lg: 16px;
    --radius-md: 8px;
}

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

body {
    color-scheme: dark;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animation */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(188, 19, 254, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    z-index: -1;
    filter: blur(50px);
}

.bg-glow-2 {
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.1) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    z-index: -1;
    filter: blur(50px);
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Typography Extensions */
.tech-title {
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
}

.container {
    margin-top: 100px !important;
}

/* Buttons */
.btn-neon {
    padding: 12px 24px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-blue {
    background: var(--accent-blue);
    color: #000;
}

.btn-blue:hover {
    box-shadow: var(--neon-glow-blue);
    transform: translateY(-2px);
}

.btn-outline-neon {
    background: transparent;
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: var(--accent-blue);
    transition: all 0.3s ease;
}

.btn-outline-neon:hover {
    border-color: var(--accent-blue);
    background: rgba(0, 243, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    transform: translateY(-1px);
}

/* Inputs e Dropdowns Premium */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.input-field,
select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300f3ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
    cursor: pointer;
}

/* Opções do Select (Tentativa de estilização nativa para browsers que suportam) */
select option {
    background-color: #0c0c16;
    color: #fff;
    padding: 10px;
}

.input-field:focus,
select:focus {
    border-color: var(--accent-blue);
    background: rgba(0, 243, 255, 0.05);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Select nativo: fundo escuro para evitar texto branco invisível */
select.input-field {
    background-color: rgba(15, 15, 28, 0.8) !important;
    color: #ffffff !important;
    cursor: pointer;
    appearance: none !important;
    -webkit-appearance: none !important;
}

select.input-field option {
    background-color: #0f0f1c;
    color: #ffffff;
}

select.input-field option:checked,
select.input-field option:hover {
    background-color: rgba(0, 243, 255, 0.2);
    color: #00f3ff;
}

/* Fallback para qualquer select no site */
select {
    background-color: #0f0f1c;
    color: #ffffff;
}

select option {
    background-color: #0f0f1c;
    color: #ffffff;
}


/* Animating Results */
.result-value {
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent-green);
    text-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
    margin: 10px 0;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.anim-spin {
    animation: spin 1s linear infinite;
}

footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px dashed rgba(160, 160, 176, 0.4);
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.footer-social {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 25px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.social-link:hover {
    transform: translateY(-5px);
    color: #fff;
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.social-link.youtube:hover {
    background: rgba(255, 0, 0, 0.1);
    border-color: #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.social-link.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border-color: transparent;
    box-shadow: 0 0 20px rgba(214, 36, 159, 0.3);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.fare-modal {
    max-width: 350px;
    width: 90%;
    padding: 30px;
    text-align: center;
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.fare-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.fare-item span:first-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.fare-item span:last-child {
    font-weight: 600;
    color: var(--accent-blue);
}

/* sliding-toggle: Flutter Style Segmented Control */
.sliding-toggle {
    display: flex;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 4px;
    width: 100%;
    margin-bottom: 20px;
    isolation: isolate;
    /* Create new stacking context */
}

.sliding-toggle input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    margin: 0;
}

.sliding-toggle label {
    flex: 1;
    position: relative;
    padding: 10px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sliding-toggle label ion-icon {
    font-size: 1.1rem;
}

.sliding-toggle label.active {
    color: #000;
}

/* Specific for Entradas/Saídas in nrdiario.html if we want to keep colors */
.sliding-toggle:has(#tabEntradas:checked) .glider {
    background: linear-gradient(135deg, #00c853, #00f3a0);
    box-shadow: 0 0 15px rgba(0, 200, 83, 0.3);
}

.sliding-toggle:has(#tabSaidas:checked) .glider {
    background: linear-gradient(135deg, #ff4e4e, #ff8080);
    box-shadow: 0 0 15px rgba(255, 78, 78, 0.3);
}

/* Default Glider Color for other toggles */
.sliding-toggle .glider {
    position: absolute;
    height: calc(100% - 8px);
    width: 0;
    left: 4px;
    top: 4px;
    background: var(--accent-blue);
    border-radius: 10px;
    z-index: 1;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.sliding-toggle:has(input:checked) label.active {
    color: #000;
}

@media (max-width: 600px) {
    .sliding-toggle label {
        padding: 8px 10px;
        font-size: 0.72rem;
        gap: 4px;
    }

    .sliding-toggle label ion-icon {
        font-size: 0.95rem;
    }

    .sliding-toggle .glider {
        border-radius: 8px;
    }
}