/* --- GLOBALS & RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #0d1117;
    --text-main: #c9d1d9;
    --text-muted: #8b949e;
    --accent: #03a9f4;
    --accent-hover: #0288d1;
    --card-bg: rgba(22, 27, 34, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Canvas */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* 100% ist sicherer als 100vw auf mobilen Geräten */
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at center, #111b29 0%, #0d1117 100%);
}
/* --- NAVBAR --- */
#top-bar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

/* --- SHRINKING NAVBAR EFFEKT --- */
#top-bar, .name, .pfp, .top-button {
    transition: all 0.1s ease;
}

#top-bar.scrolled {
    padding: 15px 5%;
    background: rgba(13, 17, 23, 0.95); 
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 0px solid var(--border-color);

}

#top-bar.scrolled .name {
    font-size: 1.5rem; /* Kleinerer Name */
}

#top-bar.scrolled .top-button {
    font-size: 1.3rem; /* Kleinere Buttons */
}

#top-bar.scrolled .pfp {
    width: 65px;  /* Kleineres Profilbild */
    height: 65px;
}


.name {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
}

.top-buttons {
    display: flex;
    gap: 50px;
}

.top-button {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s;
}

.top-button:hover { 
    color: var(--accent); 
}

.pfp {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover; 
}

/* --- HERO SECTION --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    margin-top: 50px;
}

.headline {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 20px;
    min-height: 80px; /* Platzhalter für Typewriter */
}

.typewriter-desc {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 800px;
    margin-bottom: 40px;
}

.desc-highlight {
    color: var(--accent);
    font-weight: bold;
}

.available {
    display: inline-block;
    margin-top: 15px;
    padding: 5px 15px;
    background: rgba(39, 201, 63, 0.1);
    color: #27c93f;
    border-radius: 20px;
    border: 1px solid rgba(39, 201, 63, 0.3);
    font-size: 0.9rem;
}

.button-container {
    display: flex;
    gap: 20px;
}

.primary-btn, .secondary-btn {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.primary-btn {
    background: var(--accent);
    color: #fff;
    border: none;
}
.primary-btn:hover { background: var(--accent-hover); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(3, 169, 244, 0.3); }

.secondary-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.secondary-btn:hover { border-color: var(--text-main); color: #fff; transform: translateY(-3px); }

.btn-icon { 
    width: 20px; 
    filter: brightness(0) invert(1);
 }
/* Zwingt das Icon im Roblox-Button reinweiß zu werden, unabhängig vom Klassennamen */
#rbx-profile img {
    filter: brightness(0) invert(1) !important;
    width: 30px; /* Passt die Größe an, falls es zu riesig ist */
    margin-right: 15px;
    object-fit: contain;
}
/* --- SECTION HEADERS --- */
.section-headline {
    text-align: center;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 50px;
    position: relative;
}
.section-headline::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* --- VIDEO GRID --- */
.scripting-section, .frameworks-section, .UI-section {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: 40px; 
    
    justify-content: center; /* Zentriert das gesamte Grid in der Mitte der Seite */
    justify-items: center;   /* Zentriert die einzelnen Video-Karten in ihren Spalten */
}

.video-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s;
}
.video-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

.video {
    width: 100%;
    aspect-ratio: 16 / 9; /* Zwingt das iFrame in das typische YouTube-Format */
    display: block;
    border: none; /* Entfernt den hässlichen 3D-Rahmen, den iFrames standardmäßig haben */
    border-bottom: 1px solid var(--border-color); /* Deine alte Border bleibt erhalten */
}

.video-info {
    padding: 20px;
}
.video-info h3 {
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 1.2rem;
}
.video-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* --- FRAMEWORKS (CODE) --- */
.framework-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
}

.code-wrapper {
    flex: 1 1 500px;
    background: linear-gradient(145deg, #121212, #1c1c1c);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden; 
    max-width: 800px;
    transition: 0.3s ease;
}

.code-wrapper:hover {
    border-color: rgba(3, 169, 244, 0.4);
}

.code-header {
    background: rgba(15, 15, 15, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left { display: flex; align-items: center; gap: 15px; }
.mac-dots { display: flex; gap: 6px; }
.mac-dots span { width: 12px; height: 12px; border-radius: 50%; }
.mac-dots span:nth-child(1) { background: #ff5f56; }
.mac-dots span:nth-child(2) { background: #ffbd2e; }
.mac-dots span:nth-child(3) { background: #27c93f; }

.code-header p {
    color: #e0e0e0;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}

.resize-btn {
    background: rgba(3, 169, 244, 0.1);
    border: 1px solid rgba(3, 169, 244, 0.5);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: 0.2s;
}
.resize-btn:hover { background: var(--accent); color: white; }

.unselectable-code {
    background: transparent !important;
    margin: 0 !important; 
    padding: 20px !important;
    font-family: 'Fira Code', monospace !important;
    font-size: 14px;
    max-height: 300px; 
    overflow-y: auto;  
    transition: max-height 0.4s ease;
    user-select: none;         
}
/* --- INTERAKTIVES ACCORDION-LAYOUT (NEBENEINANDER) --- */

/* 1. Weichere Animation für das ganze Fenster hinzufügen */
.code-wrapper {
    flex: 1 1 400px; /* Normale Startgröße */
    max-width: 800px;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1); /* Besonders sanfte Schiebe-Animation */
}

/* 2. MAGIE: Wenn IRGENDEIN Fenster ausgeklappt ist, mache die ANDEREN klein */
.framework-container:has(.expanded) .code-wrapper:not(.expanded) {
    flex: 1 1 150px; /* Sehr schmale Basis */
    max-width: 250px; /* Darf nicht breiter als 250px sein */
    opacity: 0.5; /* Dimmt die kleinen Fenster leicht ab, für maximalen Fokus auf das große */
}

/* 3. Das AUSGEKLAPPTE Fenster wird riesig */
.code-wrapper.expanded {
    flex: 5 1 800px; /* Nimmt 5-mal so viel Platz ein wie die anderen */
    max-width: 100%; /* Darf sich komplett ausdehnen */
    opacity: 1; /* Bleibt voll sichtbar */
}

/* 4. Text-Einstellungen für das große Fenster (kein horizontales Scrollen) */
.code-wrapper.expanded .unselectable-code { 
    max-height: 1500px;
    white-space: pre-wrap !important; 
    word-break: break-word; 
}

/* Custom Scrollbar for Code */
.unselectable-code::-webkit-scrollbar { width: 8px; }
.unselectable-code::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.unselectable-code::-webkit-scrollbar-thumb { background: rgba(3, 169, 244, 0.3); border-radius: 4px; }
.unselectable-code::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* --- UI SECTION GRID --- */
.ui-grid {
    display: grid;
    /* Wir machen die Spalten breiter (450px statt 300px), damit die HUDs mehr Platz haben */
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
}

.ui-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s;
    
    /* Flexbox hält alles schön zentriert */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ui-card:hover { 
    transform: translateY(-5px); 
    border-color: var(--accent); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.ui-card img {
    width: 100%;
    height: 350px; 
    object-fit: contain; 
    margin-bottom: 20px;
}

.ui-card p {
    font-weight: 600;
    color: #fff;
    font-size: 1.1rem;
    margin-top: auto;
}
/* --- FOOTER / CONTACT --- */
.contact-section {
    background: #090d13;
    padding: 40px 0;
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-weight: 600;
}
.contact-item img { width: 24px; }
/* --- DEVELOPMENT PROCESS SECTION --- */
.process-section {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.process-container {
    display: grid;
    /* Erstellt automatisch so viele Spalten wie Platz haben, min. 250px breit */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    position: relative;
    padding-top: 20px;
}

.process-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px 30px 30px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.process-card:hover {
    transform: translateY(-7.5px);
    border-color: rgba(3, 169, 244, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Der leuchtende Kreis mit der Nummer */
.step-badge {
    position: absolute;
    top: -25px; /* Lässt den Badge leicht über den Rand hinausragen */
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0d1117, #161b22);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
    box-shadow: 0 0 15px rgba(3, 169, 244, 0.3);
    font-family: 'Fira Code', monospace;
    transition: all 0.3s ease;
}

.process-card:hover .step-badge {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 25px rgba(3, 169, 244, 0.6);
}

.process-card h3 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 15px;
    margin-top: 10px;
}

.process-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}
/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .top-buttons { display: none; /* Auf Handys Top-Buttons ausblenden für Platz */ }
    .headline { font-size: 2.5rem; }
    .video-grid { grid-template-columns: 1fr; }
    .button-container { flex-direction: column; }
}
@media (max-width: 768px) {
    /* Navbar kompakter machen */
    .top-buttons {
        gap: 15px; 
        flex-wrap: wrap; /* Lässt Buttons umbrechen, falls es zu eng wird */
        justify-content: center;
    }
    .name {
        font-size: 1.5rem; 
    }
    .top-button {
        font-size: 1.2rem;
    }
    
    /* Riesige Überschrift etwas verkleinern */
    .headline {
        font-size: 2.5rem; 
    }

    /* Den extremen Rand von 100px an den Seiten des Grids reduzieren */
    .scripting-section, .frameworks-section, .UI-section {
        padding: 50px 5%;
    }
}