/* Variáveis de Cores e Estilo */
:root {
    --primary-blue: #0A192F;
    --accent-red: #D32F2F;
    --text-light: #F8F9FA;
    --text-dark: #333333;
    --bg-gray: #F4F6F9;
    --transition: all 0.3s ease;
}

/* Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Navegação */
header {
    background-color: var(--primary-blue);
    padding: 0.75rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 35px;
    width: auto;
    display: block;
}

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

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: 4px;
}

/* Seção de Últimos Voos (Tecnológica e Elegante) */
.recent-flights {
    padding: 5rem 5%;
    background: linear-gradient(135deg, #0A192F 0%, #112240 100%);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.recent-flights::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.1;
    pointer-events: none;
}

.recent-flights .container {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.recent-flights h2 {
    font-size: 2.2rem;
    margin-bottom: 3.5rem;
    text-align: center;
    font-weight: 300;
    letter-spacing: 2px;
}

.recent-flights h2 span {
    display: block;
    font-size: 0.8rem;
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-top: 10px;
}

.flight-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.flight-row {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--accent-red);
    padding: 1.2rem 2.5rem;
    border-radius: 4px 12px 12px 4px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 2fr 1fr 1fr;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(5px);
}

.flight-row:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.flight-row .pilot {
    display: flex;
    align-items: center;
    gap: 15px;
}

.flight-row .pilot img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.flight-row .pilot span {
    font-weight: 600;
    font-size: 0.95rem;
}

.flight-row .callsign {
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: var(--accent-red);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.flight-row .route {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.flight-row .icao {
    font-weight: 800;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.9rem;
}

.flight-row .arrow {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
    animation: flightMove 3s infinite linear;
}

@keyframes flightMove {
    0% {
        transform: translateX(-5px);
        opacity: 0.3;
    }

    50% {
        transform: translateX(5px);
        opacity: 1;
    }

    100% {
        transform: translateX(-5px);
        opacity: 0.3;
    }
}

.flight-row .aircraft {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.2);
    padding: 3px 10px;
    border-radius: 20px;
}

.network-badge {
    text-align: right;
    font-size: 0.75rem;
    font-weight: 900;
}

.network-badge span {
    padding: 4px 12px;
    border-radius: 4px;
}

.network-badge.ivao span {
    background: #0d47a1;
    color: #fff;
    box-shadow: 0 0 10px rgba(13, 71, 161, 0.4);
}

.network-badge.vatsim span {
    background: #2e7d32;
    color: #fff;
    box-shadow: 0 0 10px rgba(46, 125, 50, 0.4);
}

.no-flights {
    text-align: center;
    padding: 3rem;
    opacity: 0.5;
    font-style: italic;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

@media (max-width: 768px) {
    .flight-row {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 1.5rem;
    }

    .flight-row .route,
    .flight-row .aircraft {
        grid-column: span 2;
    }
}

nav a:hover {
    color: var(--accent-red);
}

.btn-login {
    background-color: var(--accent-red);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    color: #fff !important;
}

.btn-login:hover {
    background-color: #b71c1c;
}

/* Seção Hero */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(10, 25, 47, 0.75), rgba(10, 25, 47, 0.85)), url('../img/fundo.jpeg') no-repeat center center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 5%;
    color: var(--text-light);
    margin-top: 60px;
    position: relative;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Widget de Voos Hero */
.hero-flights-widget {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 350px;
    background: rgba(10, 25, 47, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    animation: slideInRight 1s ease-out;
    z-index: 10;
    text-align: left;
}

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.6rem;
}

.widget-header h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

.live-indicator {
    font-size: 0.65rem;
    font-weight: bold;
    color: var(--accent-red);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 rgba(211, 47, 47, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(211, 47, 47, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0);
    }
}

.widget-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.widget-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.widget-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.widget-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.widget-info {
    flex: 1;
}

.widget-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.widget-callsign {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--accent-red);
    font-size: 0.9rem;
}

.widget-network {
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.widget-network.ivao {
    background: #0d47a1;
    color: white;
}

.widget-network.vatsim {
    background: #2e7d32;
    color: white;
}

.widget-route {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.widget-arrow {
    font-size: 0.7rem;
    opacity: 0.5;
}

.widget-ac {
    margin-left: auto;
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    opacity: 0.7;
}

.no-flights-mini {
    text-align: center;
    opacity: 0.5;
    font-size: 0.9rem;
    padding: 1rem;
}

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        height: auto;
        padding: 5rem 5% 3rem;
        text-align: center;
    }

    .hero-content {
        margin-bottom: 3rem;
        max-width: 100%;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-flights-widget {
        width: 100%;
        max-width: 450px;
    }
}

.btn-primary {
    padding: 1rem 2.5rem;
    background-color: var(--accent-red);
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #b71c1c;
    transform: translateY(-2px);
}

/* Seção de Recursos (Features) */
.features {
    padding: 5rem 5%;
    background-color: #fff;
    text-align: center;
}

.features h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 3rem;
}

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

.card {
    background: var(--bg-gray);
    padding: 2.5rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent-red);
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

/* Rodapé */
footer {
    background-color: var(--primary-blue);
    color: var(--text-light);
    text-align: center;
    padding: 3rem 5% 2rem;
}

.footer-networks {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-networks span {
    font-weight: 600;
    color: var(--text-light);
    font-size: 1.1rem;
}

.footer-networks a {
    display: inline-block;
}

.footer-networks img {
    max-height: 40px;
    width: auto;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: var(--transition);
    cursor: pointer;
}

.footer-networks img:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

.footer-info p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

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

.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h2 {
    font-size: 1.8rem;
    color: var(--primary-blue);
}

.close-btn {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--accent-red);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fff;
}

.form-group select:focus {
    outline: none;
    border-color: var(--accent-red);
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.captcha-image {
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: var(--transition);
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-red);
}

.user-name {
    font-weight: 500;
    font-size: 1rem;
}

.logout-link {
    color: #aaa;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    padding: 5px 10px;
}

.logout-link:hover {
    color: var(--accent-red);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}