/* ========================================================================
   1) CSS-Variablen (Farben, Typo, Layout)
   ======================================================================== */
   :root {
    --primary:         #60AAFF;
    --secondary:       #4080FF;
    --bg:              #001530;
    --text:            #EEE;
    --code-bg:         #1E1E2F;
    --navbar-height:   4.5rem;
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s ease;
  }
  
  /* ========================================================================
     2) Global Base Styles
     ======================================================================== */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Acme', sans-serif;
    scroll-behavior: smooth;
  }
  
  /* ========================================================================
     3) Layout Wrappers
     ======================================================================== */
  .tutorial {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--navbar-height) 1rem 2rem;
  }
  
  .intro-section {
    max-width: 960px;
    margin: 6rem auto;
    padding: 0 1.5rem;
    text-align: center;
    animation: fadeIn 1.2s ease-out;
    color: var(--text);
  }
  
  .intro-headline {
    font-family: 'Stoneage', sans-serif;
    font-size: 4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2.5rem;
    color: var(--primary);
  }
  
  .intro-video-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
  }
  
  .intro-video {
    width: 480px;
    max-width: 90%;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    transition: transform var(--transition-fast);
  }
  .intro-video:hover {
    transform: scale(1.02);
  }
  
  .intro-steps {
    list-style: none;
    max-width: 540px;
    margin: 0 auto 2rem;
    padding-left: 0;
    text-align: left;
    font-size: 1.15rem;
    line-height: 1.8;
  }
  .intro-steps li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: .8rem;
  }
  .intro-steps li::before {
    content: "🚀";
    position: absolute;
    left: 0;
    top: 0;
  }
  
  /* ========================================================================
     4) Progress Bar & Floating Label
     ======================================================================== */
  #progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 4px;
    background: var(--primary);
    width: 0;
    transition: width 0.1s ease-out;
    z-index: 10000;
  }
  
  .floating-step-label {
    position: fixed;
    top: var(--navbar-height);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg);
    color: var(--primary);
    font-weight: bold;
    padding: .4rem 1rem;
    border-radius: 8px;
    box-shadow: 0 0 6px rgba(0,0,0,.3);
    font-size: .9rem;
    z-index: 9999;
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
  }
  .floating-step-label.visible {
    opacity: 1;
  }
  
  /* ========================================================================
     5) Tutorial-Hero (alt. Header)
     ======================================================================== */
  .tutorial-hero,
  .tutorial-footer {
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out;
  }
  body.tutorial-started .tutorial-hero,
  body.tutorial-started .tutorial-footer {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* ========================================================================
     6) Steps-Navigation (Sticky + Scroll-Snap)
     ======================================================================== */
  .tutorial-steps {
    display: inline-flex;
    gap: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  
    position: sticky;
    top: 1rem;
    background: var(--bg);
    padding: .5rem;
    border-radius: 4px;
    z-index: 1000;
  }
  
  .tutorial-steps button {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: .5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  }
  .tutorial-steps button.active,
  .tutorial-steps button:hover {
    background: var(--primary);
    color: var(--bg);
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--primary);
  }
  
  /* ========================================================================
     7) Tutorial-Sections (Reveal & Highlight)
     ======================================================================== */
  .tutorial-section {
    margin-bottom: 3rem;
    scroll-margin-top: 100px; /* smooth-scroll gap */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-slow), transform var(--transition-slow),
                background var(--transition-fast), border-left var(--transition-fast), padding-left var(--transition-fast);
    border-left: 4px solid transparent;
    padding-left: 1rem;
  }
  .tutorial-section.visible {
    opacity: 1;
    transform: translateY(0);
  }
  .tutorial-section.active-highlight {
    background: rgba(96,170,255,0.05);
    border-left-color: var(--primary);
  }
  
  /* Text & Code inside sections */
  .tutorial-section h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: .5rem;
  }
  .tutorial-section h3 {
    font-size: 2rem;
    margin-top: 1.5rem;
  }
  .tutorial-section p,
  .tutorial-section li {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 700px;
    margin: .5rem 0;
  }
  .tutorial-section code {
    font-size: 1.2rem;
    tab-size: 2;
  }
  .tutorial-section img {
    display: block;
    margin: 1rem auto;
    max-width: 100%;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,.5);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
    opacity: 0;
    transform: scale(0.95);
  }
  .tutorial-section.visible img {
    opacity: 1;
    transform: scale(1);
  }
  
  /* ========================================================================
     8) Code-Toolbar / Copy Button (Prism.js)
     ======================================================================== */
  .code-toolbar {
    position: relative;
  }
  .code-toolbar .toolbar {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: absolute !important;
    top: .5rem; right: .5rem;
  }
  .code-toolbar .copy-to-clipboard-button {
    display: inline-flex !important;
    align-items: center;
    gap: .25em;
    padding: .4em .6em !important;
    font-size: 1rem !important;
    background: var(--primary) !important;
    color: var(--bg) !important;
    border-radius: 4px !important;
    text-decoration: none !important;
  }
  .copy-to-clipboard-button svg,
  .copy-to-clipboard-button::before {
    font-size: 1.2em !important;
  }
  
  /* ========================================================================
     9) Tutorial Navigation Buttons
     ======================================================================== */
  .tutorial-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
  }
  .tutorial-nav button {
    background: var(--secondary);
    color: var(--bg);
    border: none;
    padding: .7rem 1.2rem;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition-fast);
  }
  .tutorial-nav button:hover {
    background: var(--primary);
  }
  
  /* ========================================================================
     10) Scroll-to-Top Button
     ======================================================================== */
  #scrollTopBtn {
    position: fixed;
    bottom: 2rem; right: 2rem;
    background: var(--primary);
    color: var(--bg);
    border: none;
    padding: .8rem 1rem;
    border-radius: 20%;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    z-index: 1000;
  }
  
  /* ========================================================================
     11) Info-Box & Collapsible Summaries
     ======================================================================== */
  .info-box,
  .info-summary {
    background: rgba(255,255,255,0.05);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 6px;
    color: var(--text);
  }
  .info-summary summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--primary);
  }
  
  /* ========================================================================
     12) Quiz Section
     ======================================================================== */
  .quiz-section {
    max-width: 900px;
    margin: 5rem auto;
    padding: 2rem;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
  }
  .quiz-title {
    text-align: center;
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  .quiz-grid {
    display: grid;
    gap: 2rem;
  }
  .quiz-card {
    background: rgba(255,255,255,0.02);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,.3);
    transition: transform var(--transition-fast);
  }
  .quiz-card:hover {
    transform: scale(1.01);
  }
  .quiz-card p {
    font-size: 1.3rem;
    margin-bottom: .8rem;
  }
  .quiz-card label {
    display: block;
    margin-bottom: .6rem;
    font-size: 1.1rem;
    cursor: pointer;
  }
  .quiz-submit {
    text-align: center;
    margin-top: 2.5rem;
  }
  .quiz-submit button {
    background: var(--secondary);
    color: var(--bg);
    border: none;
    padding: .9rem 1.5rem;
    font-size: 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition-fast);
  }
  .quiz-submit button:hover {
    background: var(--primary);
  }
  #quizResult {
    margin-top: 2rem;
    font-size: 1.3rem;
  }
  
  /* ========================================================================
     13) Sidebar Navigation
     ======================================================================== */
     #sidebarToggle {
        position: fixed;
        top: var(--navbar-height);
        left: 1rem;
        z-index: 2200;
        background: transparent;
        color: var(--bg);
        /* statt „border: none“: */
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: .5rem .8rem;
        border-radius: 8px;
        cursor: pointer;
        display: none;
        transition: border-color .3s ease;
      }
      
      #sidebarToggle:hover {
        border-color: rgba(255,255,255,1);
      }
      
  
  .sidebar-nav {
    position: fixed;
    top: 100px;
    left: 0;
    width: 250px;
    height: calc(100vh - var(--navbar-height));
    background: linear-gradient(to bottom, #001530, #002040);
    color: var(--text);
    padding: 1rem;
    z-index: 1000;
    overflow-y: auto;
    /* box-shadow: 2px 0 10px rgba(0,0,0,.4); */
    border-right: 2px solid var(--primary);
    transform: translateX(0);
    transition: transform var(--transition-fast);
  }
  
  .sidebar-nav h2 {
    font-size: 1.7rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 1.5rem;
  }
  
  .sidebar-nav ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  
  .sidebar-nav li {
    margin-bottom: .6rem;
  }
  
  .sidebar-nav a {
    display: block;
    padding: .5rem .8rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    font-weight: bold;
    background: rgba(255,255,255,0.03);
    transition: background var(--transition-fast);
  }
  .sidebar-nav a.active-step,
  .sidebar-nav a:hover {
    background: var(--primary);
    color: var(--bg);
  }
  .sidebar-nav a.checked::after {
    content: " ✔";
    float: right;
    color: var(--primary);
    font-size: .9rem;
  }
  
  /* ========================================================================
     14) Animations
     ======================================================================== */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  

  /* ========================================================================
   X) Markierte (gelesene) Sektion grün highlighten
   ======================================================================== */
.tutorial-section.completed {
    position: relative;                /* für das Häkchen-Icon */
    background: rgba(0, 255, 127, 0.05); /* leicht grüner Hintergrund */
    border-left-color: limegreen;        /* grüner Balken */
    padding-left: 1rem;                 /* konsistent mit non-highlight Zustand */
    transition: background 0.4s ease, border-left 0.4s ease;
  }
  
  .tutorial-section.completed::after {
    content: "✔️";                       /* Häkchen */
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.6rem;
    color: limegreen;
  }
  

  /* ----------------------------------------
   Reset-Button in der Sidebar
   ---------------------------------------- */
.sidebar-reset-container {
    bottom: 1rem;
    left: 1rem;
    width: 100%;
    text-align: left;
  }
  
  .btn-reset {
    width: 100%;
    background: var(--secondary);
    color: var(--bg);
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
  }
  
  .btn-reset:hover {
    background: var(--primary);
    transform: scale(1.05);
  }
  


  .tutorial-nav {
    display: flex;
    /* bleibt space-between, damit bei zwei Buttons links/rechts verteilt wird */
    justify-content: space-between;
    padding: 1rem;
  }
  
  .tutorial-nav .prev-step {
    margin-left: auto;
  }
  

  

  .intro-headline {
    font-family: 'Stoneage', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
    background: linear-gradient(90deg, #60AAFF, #4080FF, #db608d);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradientShift 3s ease-in-out infinite;
  }
  @keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  

  



  .intro-video-wrapper {
    margin: 2rem auto;
    width: 80%;
    max-width: 600px;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(0, 170, 255, 0.4);
  }
  .intro-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.1) contrast(1.2);
    transform: scale(1.05);
    transition: transform .5s ease;
  }
  .intro-video-wrapper:hover .intro-video {
    transform: scale(1.1);
  }
  


  .intro-steps {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    margin: 2rem auto;
    max-width: 800px;
  }
  .intro-steps li {
    background: rgba(255,255,255,0.05);
    padding: 1rem;
    border-radius: 10px;
    list-style: none;
    
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: transform .3s ease, background .3s ease;
  }
  .intro-steps li strong {
    flex-shrink: 0;
    font-size: 1.2rem;
    color: var(--primary);
  }
  .intro-steps li:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-4px);
  }
  


  .start-tutorial-btn {
    margin-top: 2rem;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    background: var(--primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary);
    transition: box-shadow .3s ease, transform .3s ease;
  }
  .start-tutorial-btn:hover {
    box-shadow: 0 0 20px var(--primary), 0 0 40px var(--secondary);
    transform: scale(1.05);
  }
  


  .tutorial-section,
.tutorial-section p,
.tutorial-nav button{
  font-family: var(--bs-font-monospace), monospace;
}




/* ----------------------------------------
   1) Breakpoint für einklappbare Sidebar
   ---------------------------------------- */
/* Bei Bildschirmbreiten bis 1300px: Sidebar ausblenden, Toggle-Button einblenden */
@media (max-width: 1400px) {
    #sidebarToggle {
      display: block;
    }
    .sidebar-nav {
      transform: translateX(-100%);
      /* volle Höhe, dafür über das Main-Element drüber */
      position: fixed;
      z-index: 2000;
      margin-top: 10px;
    }
    .sidebar-nav.open {
      transform: translateX(0);
    
    }
    main.tutorial {
      /* kein Platz für Sidebar freihalten */
      padding: var(--navbar-height) 1rem 2rem;
    }
    .tutorial-footer{
        margin-bottom: 100px;
    }
  }
  
  /* Ab 1301px: Sidebar immer sichtbar, Toggle verstecken, Main nach rechts gerückt */
  @media (min-width: 1401px) {
    #sidebarToggle {
      display: none;
    }
    .sidebar-nav {
      transform: translateX(0);
      position: fixed;
      width: 250px;
    }
    main.tutorial {
      padding: var(--navbar-height) 2rem 2rem 1rem;
    }
    
  }
  
  /* ----------------------------------------
     2) Feinabstimmung für Tablets & Mobile
     ---------------------------------------- */
  /* Bei kleinen Geräten bis 768px: Schrift & Abstände verkleinern */
  @media (max-width: 768px) {
    .tutorial {
      padding: var(--navbar-height) 0.5rem 1.5rem;
    }
    .tutorial-section h2 {
      font-size: 2rem;
    }
    .tutorial-section p,
    .tutorial-section li {
      font-size: 1rem;
      margin: 0.4rem 0;
    }
    .tutorial-steps {
      bottom: 0;
      top: auto;
      width: 100%;
      padding: 0.5rem;
      border-radius: 0;
    }
    .tutorial-nav {
      flex-direction: column;
      gap: 0.75rem;
    }
    .tutorial-nav button {
      width: 100%;
      text-align: center;
    }
    .start-tutorial-btn {
      width: 100%;
      padding: 0.8rem;
    }
    /* Sidebar etwas schmaler auf sehr kleinen Bildschirmen */
    .sidebar-nav {
      width: 80%;
      max-width: 300px;
    }
    #scrollTopBtn {
      bottom: 1rem;
      right: 1rem;
      padding: 0.6rem 0.8rem;
    }
  }
  

  