/* CSS Variables */
:root {
    --primary-color: #1e40af;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --dark-color: #0f172a;
    --light-color: #f0f9ff;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --aviation-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --aptos-green: #00d4aa;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    --shadow-2xl: 0 25px 50px rgba(0,0,0,0.25);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* Sticky Navigation */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    width: 45px;
    height: 45px;
    background: var(--aviation-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
    transform: rotate(-15deg);
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    color: var(--gray-900);
}

.brand-tagline {
    font-size: 0.8rem;
    color: var(--gray-600);
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.aptos-nav-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--aptos-green);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--aviation-gradient);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.nav-cta:hover {
    transform: translateY(-1px);
}

/* Hero Banner */
.hero-banner {
    min-height: 100vh;
    background: var(--aviation-gradient);
    color: var(--white);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.banner-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.flight-paths {
    position: absolute;
    width: 100%;
    height: 100%;
}

.flight-path {
    position: absolute;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform-origin: left center;
}

.flight-path::before {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 8px;
    height: 8px;
    background: var(--aptos-green);
    border-radius: 50%;
    animation: flightMove 8s ease-in-out infinite;
}

.path-1 {
    top: 20%;
    left: 0;
    width: 60%;
    transform: rotate(15deg);
    animation-delay: 0s;
}

.path-2 {
    top: 50%;
    right: 0;
    width: 70%;
    transform: rotate(-10deg);
    animation-delay: 2s;
}

.path-3 {
    bottom: 30%;
    left: 10%;
    width: 50%;
    transform: rotate(5deg);
    animation-delay: 4s;
}

@keyframes flightMove {
    0%, 100% { transform: translateX(-100px); opacity: 0; }
    10%, 90% { opacity: 1; }
    50% { transform: translateX(0); opacity: 1; }
}

.aviation-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.1;
    animation: particleFloat 15s ease-in-out infinite;
}

.particle:nth-child(1) { top: 15%; left: 20%; animation-delay: 0s; }
.particle:nth-child(2) { top: 70%; right: 25%; animation-delay: 3s; }
.particle:nth-child(3) { bottom: 20%; left: 10%; animation-delay: 6s; }
.particle:nth-child(4) { top: 40%; right: 15%; animation-delay: 9s; }

@keyframes particleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.1; }
    25% { transform: translateY(-30px) rotate(90deg); opacity: 0.2; }
    50% { transform: translateY(-15px) rotate(180deg); opacity: 0.15; }
    75% { transform: translateY(-40px) rotate(270deg); opacity: 0.25; }
}

.banner-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Orbitron', monospace;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--aptos-green), #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.live-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: var(--aptos-green);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    color: var(--aptos-green);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.primary-btn, .secondary-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.primary-btn {
    background: var(--aptos-green);
    color: var(--white);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.secondary-btn {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.secondary-btn:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Flight Board */
.flight-board {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.board-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--aptos-green);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--aptos-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.board-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.flight-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.flight-number {
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
}

.route {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.2rem;
}

.flight-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.flight-status.on-time {
    background: var(--success-color);
    color: var(--white);
}

.flight-status.delayed {
    background: var(--warning-color);
    color: var(--white);
}

.flight-status.boarding {
    background: var(--primary-color);
    color: var(--white);
}

.aptos-verification {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--aptos-green);
    color: var(--white);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Analytics Section */
.analytics-section {
    padding: 4rem 0;
    background: var(--gray-50);
}

.analytics-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.analytics-container h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    color: var(--gray-900);
    margin-bottom: 3rem;
}

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

.analytics-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
}

.analytics-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-header i {
    width: 50px;
    height: 50px;
    background: var(--aviation-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-900);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.metric-label {
    font-weight: 500;
    color: var(--gray-700);
}

.metric-value {
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Chat Section */
.chat-section {
    padding: 4rem 0;
    background: var(--white);
}

.chat-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    background: var(--gray-50);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.chat-header {
    background: var(--aviation-gradient);
    color: var(--white);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-title h3 {
    font-size: 1.3rem;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--aptos-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.chat-messages {
    padding: 2rem;
    max-height: 500px;
    overflow-y: auto;
    background: var(--white);
}

.message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.message-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--aviation-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.message-content {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 15px;
    flex: 1;
    box-shadow: var(--shadow-sm);
}

.message-content p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    color: var(--gray-700);
}

.aviation-services {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.service {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--white);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.service:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(5px);
}

.service i {
    color: var(--primary-color);
    font-size: 1.1rem;
    width: 20px;
}

.service:hover i {
    color: var(--white);
}

.service span {
    font-weight: 500;
    font-size: 0.95rem;
}

.message-time {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 1rem;
    display: block;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: var(--aviation-gradient);
    color: var(--white);
}

.user-message .message-avatar {
    background: var(--gray-400);
}

.chat-input-area {
    padding: 2rem;
    background: var(--gray-50);
}

.flight-search-bar {
    margin-bottom: 1rem;
}

.search-input {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 25px;
    padding: 1rem 1.5rem;
    gap: 1rem;
    transition: border-color 0.2s ease;
}

.search-input:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.search-input i {
    color: var(--gray-500);
    font-size: 1.2rem;
}

.search-input input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    color: var(--gray-900);
}

.search-input input::placeholder {
    color: var(--gray-500);
}

.search-btn {
    width: 45px;
    height: 45px;
    background: var(--aviation-gradient);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.search-btn:hover {
    transform: scale(1.05);
}

.search-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.powered-by {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.powered-by i {
    color: var(--aptos-green);
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    margin-bottom: 1rem;
}

.footer-logo i {
    color: var(--aptos-green);
    font-size: 1.8rem;
    transform: rotate(-15deg);
}

.footer-brand p {
    color: var(--gray-400);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.aptos-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--aptos-green);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 1rem;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.9rem;
}

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

.loading-overlay.show {
    display: flex;
}

.loading-content {
    text-align: center;
    color: var(--white);
}

.aviation-loader {
    font-size: 3rem;
    color: var(--aptos-green);
    animation: aviationSpin 2s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes aviationSpin {
    0%, 100% { transform: rotate(0deg) translateX(0); }
    25% { transform: rotate(15deg) translateX(10px); }
    50% { transform: rotate(0deg) translateX(20px); }
    75% { transform: rotate(-15deg) translateX(10px); }
}

.loading-content p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Scroll Functions */
function scrollToChat() {
    const chatSection = document.getElementById('chat');
    if (chatSection) {
        chatSection.scrollIntoView({ behavior: 'smooth', block: 'start' });
    }
}

function scrollToAnalytics() {
    const analyticsSection = document.getElementById('analytics');
    if (analyticsSection) {
        analyticsSection.scrollIntoView({ behavior: 'smooth', block: 'start' });
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .banner-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .live-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .banner-content {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .chat-container {
        margin: 0 1rem;
    }
    
    .chat-messages {
        padding: 1rem;
    }
    
    .chat-input-area {
        padding: 1rem;
    }
    
    .search-input {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .search-btn {
        width: 100%;
        border-radius: 25px;
        height: 45px;
    }
}
