/* Base */
*{ box-sizing:border-box }
html,body{ height:100% }
body{ margin:0; font-family: "Cinzel", serif; color:#e8eef9 }

/* === Desktop screen (index.php) === */
body.desktop{
  background: radial-gradient(1400px 700px at 70% 5%, #101826, #0a1118 60%, #070b10);
  min-height:100dvh;
  display:flex; align-items:center; justify-content:center;
  padding:24px;
}
/* Base wallpaper */
/* Base wallpaper (fallback) */
.wallpaper{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background: #0a0f16; /* neutral */
}

/* ☀️ Day (default) */
body.theme-day .wallpaper{
  background:
    radial-gradient(circle at 30% 10%, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 28%),
    linear-gradient(180deg, #e3e9f3 0%, #cdd8e8 40%, #a7b7cf 70%, #6c7a8f 100%);
}

/* 🌙 Night (Night Elf) */
body.theme-moon .wallpaper{
  background:
    radial-gradient(circle at 70% 20%, rgba(180,120,255,.25) 0%, rgba(40,20,60,0) 25%),
    linear-gradient(180deg, #1a0f2e 0%, #0c1a2b 40%, #0a131f 70%, #05080d 100%);
}

/* Default label style */
.label {
  font-size: 12px;
  font-weight: 600;
  display: block;
  margin-top: 6px;
  text-align: center;
  transition: color 0.3s ease;
}

/* ☀️ Day theme = darker text */
body.theme-day .label {
  color: #111; /* black / dark gray */
  text-shadow: 1px 1px 0 rgba(255,255,255,.4);
}

/* 🌙 Night theme = lighter text */
body.theme-moon .label {
  color: #f0f0f0; /* white / silver */
  text-shadow: 1px 1px 2px #000;
}




/* Snow layer (on top of wallpaper, below icons) */
#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 186%;
  pointer-events: none;
  z-index: -1; /* above wallpaper, below icons */
}

/* Wider, responsive dock bar */
/* Dock panel */
.desktop-grid{
  width: clamp(320px, 85vw, 1200px);

  /* Taller height so icons have more breathing room */
  height: clamp(240px, 45vh, 360px);

  margin: 0 auto;
  position: relative;                  /* drag context */
  overflow: hidden;                    /* keep dragged icons inside */
  user-select: none;
  -webkit-user-select: none;
  padding: clamp(32px, 6vh, 64px) clamp(24px, 5vw, 48px);  /* more padding top/bottom */
  box-sizing: border-box;

  display: flex;
  flex-wrap: wrap;                     /* wrap on small screens */
  justify-content: center;
  align-items: center;
  gap: clamp(28px, 4vw, 48px);

  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  backdrop-filter: blur(2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.25),
              inset 0 1px 0 rgba(255,255,255,.06);
}


/* Subtle lift while any icon is dragging (supported browsers) */
.desktop-grid:has(.dragging){
  box-shadow: 0 16px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
  cursor: grabbing;
}

/* Icon block */
.icon{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px;
  cursor: grab;                        /* desktop pointer feedback */
  touch-action: manipulation;          /* snappy taps on iOS */
  transform: translateZ(0);            /* smoother transforms */
}

/* While mouse is down or dragging */
.icon:active,
.icon.dragging{ cursor: grabbing; }

/* Dragging state visuals */
.icon.dragging{
  opacity: .92;
  transform: scale(1.12);              /* slightly less jumpy than 1.15 */
  z-index: 10;
  transition: transform .12s ease, opacity .12s ease;
}

/* Make the image pop a bit while dragging */
.icon.dragging .avatar-img{
  box-shadow: 0 8px 22px rgba(0,0,0,.35),
              inset 0 2px 0 rgba(255,255,255,.18),
              inset 0 -3px 0 rgba(0,0,0,.5);
}

/* placeholder that reserves space while dragging */
.icon.placeholder{
  opacity: 0;            /* invisible but keeps layout */
  pointer-events: none;
}

/* optional: show where it will drop (debug) */
/*
.icon.placeholder{ opacity:.25; outline:1px dashed rgba(255,255,255,.35); }
*/


/* Responsive tweaks for very small phones */
@media (max-width: 420px){
  .desktop-grid{
    height: clamp(160px, 35vh, 260px);
    padding: 20px 16px;
    gap: 14px;
  }
}


/* Avatar image */
.avatar-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #2b3a50;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.15),
              inset 0 -3px 0 rgba(0,0,0,.45);
  transition: transform .18s ease, box-shadow .2s ease, filter .2s ease;
}

/* Hover enlarge effect (desktop only) */
@media (hover: hover) {
  .avatar-img:hover,
  .avatar-img:focus-visible {
    transform: scale(2.0); /* bigger pop */
    box-shadow: 0 10px 28px rgba(0,0,0,.45),
                0 0 18px rgba(80,150,255,0.6);
    filter: brightness(1.15) contrast(1.05);
    transition: transform 0.25s ease, 
                box-shadow 0.25s ease, 
                filter 0.25s ease;
  }
}

/* Phone tweaks */
@media (max-width: 480px) {
  .desktop-grid {
    width: 92vw;
    padding: 12px 14px;
    gap: 12px;
    flex-wrap: wrap;            /* allow wrapping */
    justify-content: center;    /* keep icons centered */
  }

  .avatar-img {
    width: 48px; 
    height: 48px;
  }

  .label {
    font-size: 11px;
  }
}

/* Prevent sticky hover on touchscreens */
@media (hover: none) {
  .avatar-img:hover,
  .avatar-img:focus-visible {
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
  }
}


/* Label */
.label{ font-size:12px; text-align:center; color:#000000; font-weight:600 }

/* === Menu screen (menu.php) === */
/* === Menu screen (menu.php) === */
body.menu-screen {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: #0a0f16;
  overflow: hidden;
}

/* === Hanging container (chains + panel) === */
.menu-hang {
  position: relative;
  width: min(420px, 92vw);
  display: grid;
  justify-items: center;
  transform: translateY(-500px);
  animation: menuDescend 3s cubic-bezier(.22,1.3,.32,1) forwards;
}

/* Drop-in animation */
@keyframes menuDescend {
  0%   { transform: translateY(-500px); opacity: 0; }
  40%  { opacity: 1; }
  65%  { transform: translateY(25px); }
  80%  { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.menu-hang .menu-panel {
  position: relative;
  z-index: 2;
  margin-top: 0; /* panel sits flush with chains */
}

/* === Panel styling === */
.menu-panel {
  background: #1a1f27;
  border: 3px solid #444;
  border-radius: 12px;
  box-shadow: inset 0 0 15px #000, 0 0 25px rgba(0,0,0,.7);
  padding: 18px;
  width: 100%;
  max-width: 340px;
  text-align: center;
}

/* === Chains (hold panel from above) === */
.chain-big {
  position: absolute;
  top: -500px;         /* hang from above panel */
  height: 500px;       /* exact chain length */
  width: clamp(20px, 4vw, 28px);
  pointer-events: none;
  z-index: 1;

  background:
    linear-gradient(90deg, rgba(255,255,255,.22), rgba(0,0,0,.35)),
    repeating-linear-gradient(to bottom, #2f3844 0 14px, #0f141b 14px 28px);
  border: 1px solid rgba(0,0,0,.7);
  border-radius: 8px;
  box-shadow: inset 0 0 4px rgba(0,0,0,.6), 0 6px 18px rgba(0,0,0,.45);

  transform-origin: top center;
  animation: chainSway 8s ease-in-out infinite alternate;
}

.chain-big.left  { left: 22%; }
.chain-big.right { right: 22%; }

/* Gentle sway */
@keyframes chainSway {
  0%   { transform: rotate(-0.6deg); }
  100% { transform: rotate( 0.6deg); }
}

/* Bolted plate attaches chain neatly to panel */
.chain-big::after {
  content: "";
  position: absolute;
  bottom: -10px;   /* chain end sits right on panel top */
  left: 50%;
  transform: translateX(-50%);
  width: clamp(26px, 6vw, 36px);
  height: 14px;
  background: linear-gradient(180deg, #2c3846, #0f151c);
  border: 1px solid rgba(0,0,0,.7);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 2px 6px rgba(0,0,0,.45);
}

/* === Buttons === */
.menu-btn {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 14px;
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 700;
  color: gold;
  text-shadow: 1px 1px 2px #000;
  background: linear-gradient(to bottom, #1d4ed8, #0a2472);
  border: 2px solid #222;
  border-radius: 6px;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.2), inset 0 -2px 3px rgba(0,0,0,.6);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .25s ease, background .25s ease;
  text-decoration: none;
}

.menu-btn:hover {
  background: linear-gradient(to bottom, #2563eb, #103198);
  box-shadow: 0 0 12px #3b82f6, inset 0 2px 4px rgba(255,255,255,.25);
}

.menu-btn:active { transform: scale(.97); }

.menu-btn.quit {
  margin-top: 16px;
  border-color: #600;
  background: linear-gradient(to bottom, #7a1a1a, #3d0c0c);
  text-decoration: none;
}
.menu-btn.quit:hover {
  background: linear-gradient(to bottom, #a11, #600);
  box-shadow: 0 0 12px rgba(255,0,0,.5);
}

/* Desktop footer */
.desktop-footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 50; /* above wallpaper/icons */
  display: flex;
  justify-content: center;
  width: 100%;
  pointer-events: auto;

  /* Chip-style pill */
  margin: 0 auto;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(19,28,45,.55), rgba(9,14,24,.55));
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(4px);

  font-size: 12px;
  line-height: 1;
  color: #cbd5e1;
  box-shadow: 0 2px 16px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  opacity: .8;
  transition: opacity .2s ease;
}
.desktop-footer:hover{ opacity: 1; }

@media (max-width: 480px){
  .desktop-footer{
    bottom: 6px;
    padding: 5px 10px;
    font-size: 11px;
  }
}

/* Typing Banner — responsive + readable on light/dark bgs */
/* Typing Banner — fixed to viewport, not trapped by panel */
.typing-banner{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(200px + env(safe-area-inset-bottom)); /* above footer + iOS home bar */
  z-index: 999;                           /* above the panel */

  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 22px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);

  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 600;
  font-size: clamp(13px, 2.8vw, 18px);
  line-height: 1.35;
  text-align: center;

  max-width: min(92vw, 720px);
  white-space: normal;          /* allow wrap on phones */
  overflow-wrap: anywhere;
  pointer-events: none;
  opacity: .96;
}

.caret{
  display: inline-block;
  margin-left: 3px;
  animation: blink .75s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Small phones */
@media (max-width: 480px){
  .typing-banner{
    padding: 8px 12px;
    bottom: calc(150px + env(safe-area-inset-bottom));
    border-radius: 14px;
  }
}

/* ===== Mobile & small-screen fixes (portrait + landscape) ===== */

/* Ensure proper viewport on iOS dynamic bars */
@media (max-width: 900px) {
  /* Your content panels (adjust selectors to what you use) */
  .menu-panel,
  .about-panel,
  .project-panel,
  .contact-panel {
    max-width: 92vw;                     /* fit small screens */
    margin: 12px auto;
    padding: clamp(12px, 2.5vw, 18px);
    max-height: 100dvh;                  /* use dynamic viewport units */
    overflow-y: auto;                    /* make panel scrollable */
    -webkit-overflow-scrolling: touch;   /* smooth iOS scrolling */
    overscroll-behavior: contain;        /* stop background bounce */
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  /* Keep text readable but compact */
  .about-panel p,
  .project-panel p,
  .menu-panel p {
    line-height: 1.5;
    font-size: clamp(0.92rem, 2.4vw, 1rem);
    margin: 0 0 0.9rem;
    word-break: break-word;
  }

  /* Images / canvases / videos never overflow */
  img, canvas, video {
    max-width: 100%;
    height: auto;
  }

  /* Progress bars / skill bars expand fluidly */
  .progress,
  .progress-bar,
  .skill-bar,
  .bar {
    width: 100%;
    max-width: 100%;
  }
}

/* Extra rule for SHORT landscape heights (e.g., iPhone SE landscape) */
@media (max-height: 450px) and (orientation: landscape) {
  .menu-panel,
  .about-panel,
  .project-panel,
  .contact-panel {
    max-height: calc(100dvh - 20px);
    margin: 8px auto;
    padding: 10px 12px;
  }
}



















