/* =========================================================
   THEME VARIABLES
========================================================= */
:root {
  --menu-w: 270px;
  --accent-1: #0038b8;
  --accent-2: #3b82f6;
  --bg-1: #fff;
  --bg-2: #0038b8;
  --bg-3: #374151;
  --text-light: #ffffff;

  /* Extended palette */
  --primary: #3b82f6;
  --info: #60a5fa;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #f43f5e;
  --purple: #a855f7;
  --pink: #ec4899;
  --dark: #1e293b;
  --light: #f8fafc;
  --gray1: #f1f5f9;
  --gray2: #e2e8f0;
  --gray3: #cbd5e1;
  --gray4: #94a3b8;
  --gray5: #64748b;
  --gray6: #475569;
  --gray7: #334155;
  --gray8: #1e293b;
  --gray9: #0f172a;

  /* New variables for the menu theme */
  --border-radius: 12px;
  --shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  --transition: all 0.25s ease;
}

/* =========================================================
   GLOBAL RESET & BASE STYLES
========================================================= */
html, body {
  margin: 0;
  height: 100%;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text-light);
  overflow: hidden;
}
#app { height: 100%; }

/* =========================================================
   LOGO STYLES
========================================================= */
/* =========================================================
   LOGO STYLES (Revised)
========================================================= */

/* =========================================================
   LOGO STYLES (Responsive - Larger)
========================================================= */

#logoWrap {
  position: fixed;
  top: 1rem;
  right: 1rem;           /* stick to the top-right */
  z-index: 2200;
  pointer-events: none;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#logo {
  cursor: pointer;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 50%;
  padding: 0.5rem;

  /* Larger responsive size: min 60px, preferred 12vw, max 120px */
  width: clamp(60px, 12vw, 120px);
  height: auto;

  transition: transform 0.25s ease, filter 0.25s ease;
}

#logo:hover {
  transform: scale(1.1) rotate(3deg);
  filter: brightness(1.05);
}

#logo img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35));
  border-radius: 50%;
}

/* Jelly animation */
.jelly {
  animation: jelly 600ms cubic-bezier(.2, .9, .2, 1);
}

@keyframes jelly {
  0%   { transform: scale(1); }
  25%  { transform: scale(.92, 1.06) rotate(-2deg); }
  50%  { transform: scale(1.06, .94) rotate(2deg); }
  75%  { transform: scale(.98, 1.02) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); }
}



/* =========================================================
   SIDE MENU
========================================================= */
#menu {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--menu-w);
  height: 100%;
  background: transparent;
  transform: translateX(105%);
  transition: transform 0.6s cubic-bezier(.77,0,.175,1.3);
  z-index: 1800;
  padding-top: 140px;
  will-change: transform;
}
#menu.open { transform: translateX(0); }

#menu nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 16px;
}

/* =========================================================
   NEW MENU BUTTON STYLES
========================================================= */
.menu-link {
  display: block;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray3);
  transition: var(--transition);
  height: 120px;
  position: relative;
  text-decoration: none;
  margin-bottom: 12px;
}

.menu-link:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Card-specific gradient headers */
.menu-link:nth-child(1)::before { background: linear-gradient(to right, #4facfe, #00f2fe); }
.menu-link:nth-child(2)::before { background: linear-gradient(to right, #f093fb, #f5576c); }
.menu-link:nth-child(3)::before { background: linear-gradient(to right, #43e97b, #38f9d7); }
.menu-link:nth-child(4)::before { background: linear-gradient(to right, #fa709a, #fee140); }
.menu-link:nth-child(5)::before { background: linear-gradient(to right, #5ee7df, #b490ca); }
.menu-link:nth-child(6)::before { background: linear-gradient(to right, #3b82f6, #60a5fa); }
.menu-link:nth-child(7)::before { background: linear-gradient(to right, #22c55e, #10b981); }
.menu-link:nth-child(8)::before { background: linear-gradient(to right, #f59e0b, #f97316); }

.menu-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.menu-link-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 20px;
  text-align: center;
  position: relative;
}

.menu-link-inner span {
  display: block;
  transition: var(--transition);
}

.menu-link-inner span:first-child {
  font-weight: bold;
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 5px;
}

.menu-link-inner span:last-child {
  font-size: 1rem;
  color: var(--gray6);
}

.menu-link .icon {
  font-size: 1.5rem;
  margin: 5px 0;
  width: auto;
  height: auto;
  background: transparent;
  border-radius: 0;
}

/* Remove old animations */
.menu-link-inner,
#menu.open .menu-link .menu-link-inner,
#menu.closing .menu-link .menu-link-inner,
.menu-link:active .menu-link-inner {
  animation: none;
  opacity: 1;
  transform: none;
}

.menu-link::after {
  content: none;
}

/* =========================================================
   OVERLAY
========================================================= */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s;
  z-index: 1600;
}
#overlay.show { opacity: 1; visibility: visible; }

/* =========================================================
   MAIN FRAME
========================================================= */
#main { position: relative; padding: 26px; height: 100vh; overflow: hidden; }
#frameWrap {
  height: 100%;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  overflow: hidden;
}
iframe { width: 100%; height: 100%; border: 0; }

/* =========================================================
   FLOATING LETTERS
========================================================= */
.float-letters {
  position: absolute;
  right: 8%;
  top: 10%;
  pointer-events: none;
}
.letter {
  font-size: 48px;
  opacity: .08;
  font-weight: 900;
  display: inline-block;
  margin: 6px;
  animation: float 6s ease-in-out infinite;
}
.letter:nth-child(1) { animation-delay: 0s; }
.letter:nth-child(2) { animation-delay: 1s; }
.letter:nth-child(3) { animation-delay: .6s; }
@keyframes float {
  0% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-18px) rotate(6deg); }
  100% { transform: translateY(0) rotate(0); }
}

/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 900px) {
  #menu { width: 86vw; }
  :root { --menu-w: 86vw; }
}