/* --- DESIGN SYSTEM & TOKENS --- */
:root {
    --bg-dark: #070913;
    --primary: #ff8c00;
    --primary-glow: rgba(255, 140, 0, 0.35);
    --secondary: #00bfff;
    --secondary-glow: rgba(0, 191, 255, 0.25);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.09);
    --glass-blur: blur(18px);
    --text-main: #f0f3ff;
    --text-muted: #8e9bb0;
    --font-display: 'Outfit', sans-serif;
    --font-ui: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-ui);
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

body:has(.landing-page-wrapper) {
    display: block;
    overflow-y: auto;
}

body:has(#game-container) {
    height: 100vh;
    overflow: hidden;
}


/* --- GAME CONTAINER (Locked aspect ratio on desktop, full screen on mobile) --- */
#game-container {
    width: 100%;
    height: 100%;
    max-width: 480px;
    max-height: 850px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #1b264f 0%, #080c21 100%);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

@media (min-width: 480px) {
    #game-container {
        border-radius: 24px;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
}

/* --- BACKGROUND GRAPHICS --- */
.sky-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    filter: blur(20px);
}

.cloud-1 {
    width: 300px;
    height: 150px;
    top: 10%;
    left: -10%;
    animation: drift 75s linear infinite;
}

.cloud-2 {
    width: 450px;
    height: 200px;
    top: 40%;
    right: -20%;
    animation: drift-reverse 90s linear infinite;
}

.cloud-3 {
    width: 250px;
    height: 100px;
    bottom: 15%;
    left: 15%;
    animation: drift 110s linear infinite;
}

@keyframes drift {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(500px); }
}

@keyframes drift-reverse {
    0% { transform: translateX(100px); }
    100% { transform: translateX(-500px); }
}

/* --- GLASS PANEL COMPONENT --- */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* --- VIEW CONTROLLER --- */
.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.view.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    position: relative;
}

/* --- HOME VIEW STYLE --- */
#home-view {
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.main-menu {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 90%;
    overflow-y: auto;
}

.game-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-align: center;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(255, 140, 0, 0.3);
}

.game-title .highlight {
    color: var(--primary);
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: -15px;
    margin-bottom: 5px;
}

.menu-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-section h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Model Cards Selection */
.model-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.model-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.model-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.model-card.active {
    background: rgba(255, 140, 0, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.15);
}

.model-icon {
    font-size: 1.8rem;
}

.model-info {
    display: flex;
    flex-direction: column;
}

.model-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.model-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Weather & Wind Widgets */
.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.weather-widgets {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 16px;
}

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

.widget-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-range-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Custom Sliders */
input[type=range] {
    flex-grow: 1;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
    cursor: pointer;
    transition: transform 0.1s ease;
}

input[type=range]::-webkit-slider-thumb:active {
    transform: scale(1.3);
}

#wind-speed-val, #wind-angle-val {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

/* Compass Widget */
.compass-widget {
    display: flex;
    align-items: center;
    gap: 20px;
}

.compass-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.compass-arrow {
    width: 4px;
    height: 36px;
    background: linear-gradient(to bottom, var(--primary) 50%, var(--secondary) 50%);
    position: absolute;
    top: calc(50% - 18px);
    left: calc(50% - 2px);
    border-radius: 2px;
    transform: rotate(45deg);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.compass-arrow::after {
    content: '';
    position: absolute;
    top: 0;
    left: -3px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid var(--primary);
}

.direction-indicator {
    position: absolute;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
}

.direction-indicator.north { top: 2px; left: 50%; transform: translateX(-50%); color: var(--primary); }
.direction-indicator.east { right: 4px; top: 50%; transform: translateY(-50%); }
.direction-indicator.south { bottom: 2px; left: 50%; transform: translateX(-50%); }
.direction-indicator.west { left: 4px; top: 50%; transform: translateY(-50%); }

/* Records Section */
.records-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.record-badge {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge-title {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    margin-top: 2px;
}

/* BUTTONS */
.btn {
    border: none;
    outline: none;
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #ff8c00 0%, #ff5500 100%);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 85, 0, 0.5);
}

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

.btn-primary:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-large {
    padding: 16px;
    width: 100%;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Glowing buttons */
.glow-btn {
    animation: button-pulse 2s infinite alternate;
}

@keyframes button-pulse {
    0% { box-shadow: 0 0 10px var(--primary-glow); }
    100% { box-shadow: 0 0 25px rgba(255, 140, 0, 0.6); }
}

/* --- FOLD VIEW STYLE --- */
.hud-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.hud-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.fold-counter {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

.workspace-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 60px;
    margin-bottom: 80px;
    z-index: 20;
}

.canvas-wrapper {
    position: relative;
    width: 320px;
    height: 480px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6), 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#fold-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

#guide-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
}

#guide-target {
    fill: none;
    stroke: rgba(0, 191, 255, 0.35);
    stroke-width: 2.5;
    stroke-dasharray: 6, 6;
    animation: guide-glow 3s infinite ease-in-out;
}

@keyframes guide-glow {
    0% { stroke: rgba(0, 191, 255, 0.25); filter: drop-shadow(0 0 1px var(--secondary-glow)); }
    50% { stroke: rgba(0, 191, 255, 0.5); filter: drop-shadow(0 0 4px rgba(0, 191, 255, 0.6)); }
    100% { stroke: rgba(0, 191, 255, 0.25); filter: drop-shadow(0 0 1px var(--secondary-glow)); }
}

.bottom-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
    z-index: 100;
}

.toast-instructions {
    position: absolute;
    bottom: 76px;
    left: 5%;
    width: 90%;
    background: rgba(7, 9, 19, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    z-index: 90;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* --- THROW VIEW STYLE --- */
.throw-hud-status {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.throw-zone {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
    margin-top: 60px;
    margin-bottom: 60px;
    touch-action: none;
}

.throw-prompt-pulse {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 40px;
    letter-spacing: 1px;
    animation: prompt-pulse 1.5s infinite alternate;
}

@keyframes prompt-pulse {
    0% { opacity: 0.3; transform: scale(0.97); }
    100% { opacity: 0.95; transform: scale(1.02); color: var(--primary); }
}

.airplane-throw-container {
    width: 280px;
    height: 280px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease-out;
}

#airplane-preview-canvas {
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.5));
}

.device-motion-prompt {
    margin-top: 40px;
    width: 90%;
    display: flex;
    justify-content: center;
}

/* --- FLIGHT VIEW STYLE --- */
.flight-hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    z-index: 100;
}

.hud-stat {
    background: rgba(7, 9, 19, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-val {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 2px;
}

.flight-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

#flight-canvas {
    width: 100%;
    height: 100%;
}

.flight-wind-indicator {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(7, 9, 19, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100;
}

.wind-arrow-mini {
    width: 2px;
    height: 16px;
    background: var(--primary);
    position: relative;
}

.wind-arrow-mini::after {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-bottom: 5px solid var(--primary);
}

.wind-hud-status {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- RESULTS VIEW STYLE --- */
#results-view {
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.results-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.results-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.result-distance-highlight {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--secondary);
    text-shadow: 0 0 25px var(--secondary-glow);
    margin: 10px 0;
}

.stats-table {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(0,0,0,0.15);
    padding: 16px;
    border-radius: 12px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 8px;
}

.stats-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.row-label {
    color: var(--text-muted);
}

.row-val {
    font-weight: 600;
}

.new-record-banner {
    background: linear-gradient(90deg, #ffcc00 0%, #ff8c00 100%);
    color: #000;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 800;
    padding: 8px 24px;
    border-radius: 20px;
    animation: bounce 0.8s infinite alternate;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-6px); }
}

.results-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
}

.results-actions .btn-primary {
    grid-column: span 2;
}

/* Custom Scrollbar for the glass panel list */
.main-menu::-webkit-scrollbar {
    width: 4px;
}

.main-menu::-webkit-scrollbar-track {
    background: transparent;
}

.main-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* --- LANDING & PRIVACY PAGE LAYOUT --- */
.landing-page-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-top: 100px; /* Space for fixed header */
    background: radial-gradient(circle at center, #1b264f 0%, #080c21 100%);
}

.landing-page-wrapper .sky-background {
    position: fixed;
    z-index: 1;
}

/* --- HEADER / NAVIGATION BAR --- */
.main-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 1000;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.header-logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -1px;
    cursor: pointer;
    text-shadow: 0 0 15px rgba(255, 140, 0, 0.2);
}

.header-logo .highlight {
    color: var(--primary);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    position: relative;
    padding: 5px 0;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--text-main);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.25s ease;
}

.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}

.nav-play-btn {
    background: rgba(255, 140, 0, 0.15);
    border: 1px solid var(--primary);
    padding: 8px 18px !important;
    border-radius: 12px;
    color: var(--primary) !important;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.1);
}

.nav-play-btn:hover {
    background: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.3) !important;
}

.nav-play-btn::after {
    display: none !important;
}

/* --- LANGUAGE SELECTOR --- */
.lang-selector, .game-lang-toggle {
    display: flex;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.lang-btn {
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: var(--text-main);
}

.lang-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(255, 140, 0, 0.3);
}

/* --- LANDING CONTENT SECTIONS --- */
.landing-main, .page-content {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* HERO SECTION */
.hero-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
    padding: 60px;
    border-radius: 32px;
    min-height: 480px;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, #fff 40%, #ffd7a8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hero-sub {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 580px;
}

.hero-actions {
    width: 100%;
    max-width: 320px;
}

/* HERO ANIMATED VISUAL */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 100%;
}

.visual-plane-container {
    width: 250px;
    height: 250px;
    position: relative;
    animation: float-plane 6s ease-in-out infinite alternate;
}

.visual-svg-plane {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.4));
    transform: rotate(-10deg);
}

.visual-wind-line {
    position: absolute;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0) 100%);
    height: 2px;
    border-radius: 1px;
}

.visual-wind-1 { width: 120px; top: 30%; left: -50px; animation: wind-drift 3.5s linear infinite; }
.visual-wind-2 { width: 180px; top: 60%; left: -80px; animation: wind-drift 2.5s linear infinite 0.5s; }
.visual-wind-3 { width: 100px; top: 80%; left: -30px; animation: wind-drift 4s linear infinite 0.2s; }

@keyframes float-plane {
    0% { transform: translateY(-10px) rotate(-12deg); }
    100% { transform: translateY(15px) rotate(-6deg); }
}

@keyframes wind-drift {
    0% { transform: translateX(-150px); opacity: 0; }
    30% { opacity: 1; }
    70% { opacity: 1; }
    100% { transform: translateX(250px); opacity: 0; }
}

/* FEATURES SECTION */
.section-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 30px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 140, 0, 0.3);
    box-shadow: 0 15px 35px rgba(255, 140, 0, 0.08);
}

.feature-icon {
    font-size: 2.5rem;
    background: rgba(255, 140, 0, 0.08);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid rgba(255, 140, 0, 0.15);
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* HOW TO PLAY SECTION */
.how-to-play-section {
    padding: 50px;
    border-radius: 32px;
}

.steps-flow {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.step-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    position: relative;
}

.step-card:not(:last-child)::after {
    content: '➔';
    position: absolute;
    top: 25px;
    right: -25px;
    color: var(--primary);
    font-size: 1.5rem;
    opacity: 0.5;
}

.step-num {
    background: linear-gradient(135deg, #ff8c00 0%, #ff5500 100%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.step-card h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 8px;
}

.step-card p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* PRIVACY PAGE SPECIFICS */
.info-section {
    padding: 50px;
    border-radius: 32px;
}

.info-section h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.last-updated {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
    margin-bottom: 30px;
}

.privacy-block {
    margin-bottom: 25px;
}

.privacy-block h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary);
}

.privacy-block p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
    opacity: 0.85;
}

/* FOOTER */
.main-footer {
    width: 100%;
    text-align: center;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.main-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.main-footer a {
    color: var(--primary);
    text-decoration: none;
}

.main-footer a:hover {
    text-decoration: underline;
}

/* --- GAME VIEW MENU TOP BAR --- */
.menu-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: -5px;
}

/* --- MOBILE RESPONSIVENESS & ADAPTATIONS --- */
@media (max-width: 992px) {
    .hero-section {
        grid-template-columns: 1fr;
        padding: 40px;
        text-align: center;
        gap: 30px;
    }
    .hero-text {
        align-items: center;
    }
    .hero-headline {
        font-size: 2.6rem;
    }
    .hero-actions {
        width: 100%;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .steps-flow {
        grid-template-columns: repeat(2, 1fr);
    }
    .step-card:nth-child(2)::after {
        display: none;
    }
}

@media (max-width: 600px) {
    .main-header {
        height: 60px;
        padding: 0 15px;
    }
    .header-logo {
        font-size: 1.3rem;
    }
    .main-nav {
        gap: 15px;
    }
    .main-nav a {
        font-size: 0.85rem;
    }
    .nav-play-btn {
        padding: 5px 12px !important;
    }
    .hero-headline {
        font-size: 2.1rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .steps-flow {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .step-card::after {
        display: none !important;
    }
    .info-section, .hero-section {
        padding: 30px 20px;
    }
    .info-section h1 {
        font-size: 2rem;
    }
}

/* --- MOBILE SPECIFIC HEIGHT FIXES (CANVAS SCALING) --- */
@media (max-height: 720px) {
    .workspace-container {
        margin-top: 45px;
        margin-bottom: 50px;
    }
    .canvas-wrapper {
        transform: scale(0.9);
        transform-origin: center;
    }
    .bottom-actions {
        padding: 8px 16px;
    }
    .toast-instructions {
        bottom: 60px;
    }
}

@media (max-height: 620px) {
    .workspace-container {
        margin-top: 35px;
        margin-bottom: 40px;
    }
    .canvas-wrapper {
        transform: scale(0.8);
        transform-origin: center;
    }
    .toast-instructions {
        bottom: 50px;
        font-size: 0.75rem;
    }
}

