/* ========================== */
/* FLY BEYOND SKY   */
/* Main Styles                */
/* An INCREDIBLES Production  */
/* ========================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-panel: rgba(15, 23, 42, 0.95);
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-hover: rgba(51, 65, 85, 0.6);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-orange: #f97316;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-yellow: #eab308;
    --accent-purple: #a855f7;
    --glow-blue: 0 0 20px rgba(59, 130, 246, 0.5);
    --glow-cyan: 0 0 20px rgba(6, 182, 212, 0.5);
    --glow-orange: 0 0 20px rgba(249, 115, 22, 0.5);
    --border-color: rgba(59, 130, 246, 0.3);
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Screen Management */
.screen {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.screen.active {
    display: flex;
    opacity: 1;
    z-index: 10;
}

.screen.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.screen.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

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

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

/* Common Elements */
.screen-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.screen-header h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--accent-cyan);
}

.btn-back {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--border-color);
    color: var(--accent-blue);
    padding: 8px 16px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back:hover {
    background: rgba(59, 130, 246, 0.3);
    box-shadow: var(--glow-blue);
}

.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.4);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* Overlay */
.overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
}

.overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.overlay-header h3 {
    font-family: var(--font-display);
    color: var(--accent-cyan);
    letter-spacing: 2px;
}

.btn-close {
    background: none;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Modal */
.modal-box {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 20px;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.toast.success { border-color: var(--accent-green); }
.toast.error { border-color: var(--accent-red); }
.toast.warning { border-color: var(--accent-yellow); }
.toast.info { border-color: var(--accent-cyan); }

.toast-exit {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Difficulty Selector */
.difficulty-selector {
    display: flex;
    gap: 4px;
}

.diff-btn {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 4px;
}

.diff-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.diff-btn:hover:not(.active) {
    background: rgba(59, 130, 246, 0.2);
}

/* Utility Classes */
.placeholder-text {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
    padding: 8px;
}

.btn-sm {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--border-color);
    color: var(--accent-blue);
    padding: 4px 12px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-sm:hover {
    background: rgba(59, 130, 246, 0.3);
}

/* Phase Badge */
.phase-badge {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    padding: 2px 10px;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
    .screen-header {
        padding: 0 12px;
    }
    .screen-header h2 {
        font-size: 0.85rem;
    }
}

