/* ===============================================
   Slimme Vuilnisbak – Robbe Wulgaert - AI in de Klas
   =============================================== */

/* ===== Reset & Basis ===== */
html {
  box-sizing: border-box;
  font-family: "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}
*, *::after, *::before { box-sizing: inherit; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden; /* Prevent scrolling on desktop, full app feel */
}

body {
  background: var(--bg); /* Variables from index.html */
  color: var(--text);
}

/* ===== Main Layout: The 50/50 Split ===== */
main#app {
  display: flex;
  flex-direction: row; /* Horizontal layout */
  width: 100%;
  height: 100vh;       /* Full viewport height */
  position: relative;
}

/* Common styles for both halves */
.split-pane {
  flex: 1;             /* Each takes exactly 50% */
  display: flex;
  justify-content: center; /* Center horizontally */
  align-items: center;     /* Center vertically */
  position: relative;
  padding: 2rem;       /* Padding from screen edges */
}

/* ===== Left Pane: Phone Mockup ===== */
.pane-phone {
  /* Optional: visual separator if needed, currently clean */
}

.iphone {
  position: relative;
  height: 875px;
  width: 423px;
  background: #111;
  border: 5px solid #3D3D3D;
  border-radius: 50px;
  box-shadow: inset 0 0 3px 0 rgba(0,0,0,0.2), 0 0 0 1px #999, 0 0 30px 0px rgba(0,0,0,0.7);
  
  /* Flexbox inside phone to center screen content */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 15px;

  /* Scale down to fit standard screens */
  transform: scale(0.65);
  transform-origin: center center;
}

/* (Existing iPhone internals kept compact for brevity) */
.iphone .buttons div { background: #111; position: absolute; border-radius: 2px; }
.iphone .buttons .silent { height: 40px; width: 3px; top: 100px; left: -8px; }
.iphone .buttons .vol-up { top: 170px; left: -8px; height: 60px; width: 4px; }
.iphone .buttons .vol-down { top: 250px; left: -8px; height: 60px; width: 4px; }
.iphone .buttons .sleep { right: -8px; top: 180px; height: 100px; width: 4px; }
.iphone .top { position: absolute; top: 4px; width: 100%; display: flex; justify-content: center; z-index: 4; filter: url("#goo"); pointer-events: none; }
.iphone .top .black-bar { position: absolute; height: 1px; width: 70%; padding-top: 2px; background: #111; }
.iphone .top .iphone-top { position: relative; height: 40px; width: 55%; background: #111; border-radius: 0 0 20px 20px; z-index: 2; }
.iphone .components { position: absolute; top: 20px; padding-left: 12px; display: flex; justify-content: center; z-index: 5; pointer-events: none; }
.iphone .components .speaker { height: 6px; width: 70px; margin: 0 30px; border-radius: 6px; border-bottom: 1px solid #333; background: #222; }
.iphone .components .camera { height: 15px; width: 15px; border-radius: 50%; background: radial-gradient(black, #333); opacity: 0.5; }
.iphone .top-bar, .iphone .bottom-bar { position: absolute; left: -5px; height: 15px; width: 423px; border-left: 5px solid #111; border-right: 5px solid #111; }
.iphone .top-bar { top: 65px; } .iphone .bottom-bar { bottom: 65px; }

.iphone .screen {
  position: relative;
  height: calc(100% - 12px); width: calc(100% - 12px);
  margin: 0 auto;
  border: 2px solid rgba(0,0,0,0.9); border-radius: 40px;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.iphone .screen video { position: absolute; height: 100%; width: 100%; object-fit: cover; z-index: -1; }

/* AI App inside Phone */
.iphone .AIapp {
  position: relative; z-index: 1; text-align: center;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

/* ===== Right Pane: Classes & Info ===== */
.pane-info {
  /* No specific styling needed, inherits centering from .split-pane */
}

.uitleg {
  /* The Card Appearance */
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  
  /* Dimensions */
  width: 100%;
  max-width: 600px; /* Prevents it from getting too wide on huge screens */
  text-align: center;
}

/* Typography matching original */
.uitleg h1 { font-size: 48px; margin: 0 0 20px 0; color: inherit; }
.uitleg h2 { font-size: 36px; margin: 10px 0; color: inherit; }
.uitleg p { font-size: 20px; line-height: 1.5; color: inherit; margin-bottom: 1rem; }

/* Header Logo */
.logoSLC {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  font-size: 0.8rem;
  opacity: 0.5;
}

/* Footer */
.site-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  text-align: center;
  padding: 8px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 10;
  font-size: 0.8rem;
}

/* ===== UI Elements ===== */
#canvasContainer { margin: 0 auto; }
canvas { display: block; margin: 0 auto; }

#labelContainer {
  margin-top: 10px;
  background-color: rgba(255,255,255,0.85);
  padding: 10px; border-radius: 8px;
  display: inline-block; border: 1px solid var(--border);
}
#labelContainer p { color: #000; font-size: 18px; margin: 5px 0; }
body.dark #labelContainer { background-color: rgba(0,0,0,0.55); }
body.dark #labelContainer p { color: #fff; }

#connectButton {
  display: inline-block; margin: 20px auto; padding: 10px 20px; font-size: 18px; cursor: pointer;
  background-color: var(--primary); color: white; border: 1px solid transparent; border-radius: 8px;
  transition: all 0.2s;
}
#connectButton:hover { background-color: #3700b3; }
body.dark #connectButton { background: #fff; color: var(--primary); border-color: var(--primary); }

/* ===== Responsiveness ===== */
/* Breakpoint: When screen is too narrow (e.g. tablet portrait), stack them */
@media screen and (max-width: 1024px) {
  html, body { overflow: auto; /* Enable scroll */ }
  main#app {
    flex-direction: column;
    height: auto;
    padding-bottom: 60px; /* Space for footer */
  }
  
  .split-pane {
    width: 100%;
    flex: none; /* Disable 50% split */
    padding: 2rem 1rem;
  }

  .pane-phone { order: 1; height: 600px; }
  .pane-info  { order: 2; }
  
  .iphone { transform: scale(0.6); }
  .uitleg h1 { font-size: 2.5rem; }
}

@media screen and (max-width: 600px) {
  .iphone { transform: scale(0.45); }
  .pane-phone { height: 450px; }
}