/* JEPPAS - Custom Styling */

:root {
    /* Color Palette - Aviation-Inspired Dark Theme */
    --bg-primary: #050A12;
    --bg-secondary: #0A1428;
    --bg-tertiary: #0F1F35;
    --bg-card: #0D1829;
    --bg-hover: #132740;
    
    /* Accent Colors */
    --accent-teal: #00D4AA;
    --accent-teal-dark: #00A888;
    --accent-teal-glow: rgba(0, 212, 170, 0.15);
    --accent-orange: #FF6B35;
    --accent-blue: #2563EB;
    --accent-red: #EF4444;
    --accent-yellow: #FBBF24;
    
    /* Text Colors */
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    /* Borders */
    --border-color: #1E3A5F;
    --border-highlight: #00D4AA;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Typography */
    --font-display: 'Source Sans Pro', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--accent-teal-glow);
}


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


body {
    font-family: var(--font-display);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}


/* Animated Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 170, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 50px,
            rgba(30, 58, 95, 0.1) 50px,
            rgba(30, 58, 95, 0.1) 51px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 50px,
            rgba(30, 58, 95, 0.1) 50px,
            rgba(30, 58, 95, 0.1) 51px
        );
    pointer-events: none;
    z-index: -1;
}


.container {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-lg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-2xl);
}


.logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}


.logo-icon {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 8px var(--accent-teal-glow));
}


.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent-teal);
    text-transform: uppercase;
}

.logo-text span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}


.header-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}


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

.status-indicator.active {
    background: var(--accent-teal);
    box-shadow: 0 0 8px var(--accent-teal);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}


/* Main Content */
.main-content {
    flex: 1;
}


/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.hero-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, var(--text-primary), var(--accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}


/* Input Section */
.input-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-md);
}


.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    resize: vertical;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px var(--accent-teal-glow);
}

.form-group textarea::placeholder {
    color: var(--text-muted);
}

.help-text {
    margin-top: var(--space-xs);
    font-size: 0.8rem;
    color: var(--text-muted);
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-teal-dark));
    color: var(--bg-primary);
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 0 30px var(--accent-teal-glow);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary.loading .btn-icon {
    animation: spin 1s linear infinite;
}

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-teal);
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: var(--space-lg);
}


/* Example Tags */
.examples {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.examples h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

.example-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tag {
    padding: var(--space-xs) var(--space-md);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--bg-hover);
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}


/* Jobs Section */
.jobs-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.jobs-list {
    min-height: 150px;
}

.jobs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
    text-align: center;
}

.jobs-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

/* Job Card */
.job-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.job-card:hover {
    border-color: var(--accent-teal);
    transform: translateX(4px);
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.job-id {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-teal);
}

.job-status {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 4px;
}

.job-status.pending {
    background: rgba(251, 191, 36, 0.15);
    color: var(--accent-yellow);
}

.job-status.running {
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent-blue);
}

.job-status.completed {
    background: rgba(0, 212, 170, 0.15);
    color: var(--accent-teal);
}

.job-status.failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.job-card-stats {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.job-stat {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.job-stat.success {
    color: var(--accent-teal);
}

.job-stat.fail {
    color: var(--accent-red);
}

.job-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}


/* Footer */
.footer {
    margin-top: auto;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.separator {
    opacity: 0.3;
}


/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.modal.open {
    display: block;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 18, 0.85);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.modal-header .job-id {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.modal-body {
    padding: var(--space-xl);
}

.progress-container {
    margin-bottom: var(--space-xl);
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
    border-radius: 4px;
    transition: width var(--transition-normal);
}

.progress-text {
    margin-top: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

.job-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 600;
}

.icao-progress h4 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.icao-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.icao-item {
    padding: var(--space-xs) var(--space-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    color: var(--text-secondary);
}

.icao-item.done {
    background: rgba(0, 212, 170, 0.15);
    color: var(--accent-teal);
}

.icao-item.fail {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.modal-footer {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--border-color);
}

.modal-footer .btn {
    width: 100%;
}


/* Responsive */
@media (max-width: 640px) {
    .header {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .hero-section h2 {
        font-size: 1.5rem;
    }
    
    .job-details {
        grid-template-columns: 1fr;
    }
}