/* ==========================================================================
   WING-RACER HSNR - APPLE MAC PRO STYLE DESIGN SYSTEM
   ========================================================================== */

:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0c;
    --bg-card: rgba(22, 22, 26, 0.7);
    --bg-glass: rgba(18, 18, 22, 0.75);
    
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #6e6e73;
    
    --accent-cyan: #00f0ff;
    --accent-blue: #0071e3;
    --accent-orange: #ff6b00;
    --accent-green: #30d158;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-highlight: rgba(0, 240, 255, 0.4);
    
    --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    --transition-fast: 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* Typography Utility */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #a1a1a6 50%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-orange {
    background: linear-gradient(135deg, #ff9a00 0%, #ff5500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 68px;
    height: auto;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 8px 30px;
    transition: var(--transition-fast);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.nav-brand span {
    color: var(--accent-cyan);
}

.navbar nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    min-width: 280px;
}

.navbar > div:last-child {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: clamp(0.75rem, 0.85vw, 0.92rem);
    font-weight: 500;
    transition: var(--transition-fast);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: #ffffff !important;
    font-weight: 700 !important;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, rgba(0,0,0,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
    animation: pulseGlow 3s infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(0, 240, 255, 0.2); }
    50% { box-shadow: 0 0 30px rgba(0, 240, 255, 0.5); }
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    margin-bottom: 20px;
    letter-spacing: -0.04em;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-cyan);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.hero-image-container {
    width: 100%;
    max-width: 1100px;
    margin-top: 60px;
    position: relative;
    z-index: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 30px 100px rgba(0,0,0,0.8);
}

.hero-image-container img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1.02);
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-image-container:hover img {
    transform: scale(1.05);
}

/* Sections Layout */
.section {
    padding: 120px 40px;
    max-width: 1300px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
}

.section-tag {
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    display: block;
}

.section-header h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
}

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

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Cards & Glassmorphism */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    backdrop-filter: blur(16px);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--border-highlight);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.card h3 {
    font-size: 1.75rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Interactive Tabs */
.tabs-container {
    margin-top: 40px;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.tab-btn:hover, .tab-btn.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Video Player Containers */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.video-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.video-card:hover {
    border-color: var(--accent-cyan);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    outline: none;
}

.video-info {
    padding: 24px;
}

.video-info h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--accent-cyan);
}

.video-info p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Interactive Shop Simulator (Beschaffung) */
.shop-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.shop-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shop-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.shop-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.shop-item-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.shop-item-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    padding: 8px;
    flex-shrink: 0;
}

.shop-checkbox {
    width: 24px;
    height: 24px;
    accent-color: var(--accent-cyan);
    cursor: pointer;
}

.shop-item-text h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.shop-item-text span {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.shop-item-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-cyan);
}

.shop-summary {
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    padding: 30px;
    border-radius: var(--radius-lg);
    position: sticky;
    top: 100px;
}

.shop-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* WING-Ball Interactive Score Calculator */
.calc-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.calc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.calc-label h4 {
    font-size: 1.1rem;
}

.calc-label p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.calc-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calc-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.calc-btn:hover {
    background: var(--accent-cyan);
    color: #000;
}

.calc-val {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
}

.calc-score-display {
    margin-top: 30px;
    padding: 24px;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--accent-cyan);
    border-radius: var(--radius-md);
    text-align: center;
}

.calc-score-display h3 {
    font-size: 2.5rem;
    color: var(--accent-cyan);
}

/* Responsive Design */
@media (max-width: 992px) {
    .grid-2, .shop-container {
        grid-template-columns: 1fr;
    }
    .video-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 8px 15px;
        justify-content: center;
    }
    .section {
        padding: 80px 20px;
    }
    .card {
        padding: 24px;
    }
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Chapter Pagination Navigation */
.chapter-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 60px auto 0;
    padding: 40px;
    border-top: 1px solid var(--border-color);
    gap: 20px;
    flex-wrap: wrap;
}

.chapter-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.chapter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-cyan);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.2);
}

.chapter-btn.next {
    margin-left: auto;
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.chapter-btn.next:hover {
    background: var(--accent-cyan);
    color: #000;
}

/* 3D CAD Viewer Interactive Container */
.stl-viewer-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-top: 40px;
}

.stl-canvas-wrapper {
    width: 100%;
    height: 520px;
    background: radial-gradient(circle at center, #1e1e2d 0%, #0a0a0f 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 240, 255, 0.25);
    position: relative;
    overflow: hidden;
    cursor: grab;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
}

.stl-canvas-wrapper:active {
    cursor: grabbing;
}

.stl-controls-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.stl-info-badge {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--accent-cyan);
    font-weight: 600;
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Telemetry Simulation Dashboard */
.sim-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 2fr;
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 992px) {
    .sim-grid {
        grid-template-columns: 1fr;
    }
}

.sim-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.sim-metric-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.sim-metric-box span.label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.sim-metric-box span.val {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-cyan);
}

/* Entferne die Pfeile (Spinner Buttons) bei numerischen Eingaben */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button,
input.no-arrows::-webkit-inner-spin-button,
input.no-arrows::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"],
input.no-arrows {
    -moz-appearance: textfield;
    appearance: none;
}
