
/* AI-Like-U v2.0.0 – Full Premium UI */

/* VARIABLES */
:root {
  --green: #0b7f32;
  --green-dark: #06451d;
  --yellow: #ffd600;
  --yellow-soft: #fff59d;
  --yellow-deep: #e6c200;
  --bg-body: #ffffff;
  --bg-frame: #0b7f32;
  --text-main: #111111;

  --shadow-3d: 0 10px 24px rgba(0,0,0,0.28);
  --shadow-glow: 0 0 16px rgba(255,214,0,0.8);

  --radius: 12px;
  --radius-lg: 20px;

  --fast: 0.16s ease-out;
  --med: 0.25s ease;
  --slow: 0.4s cubic-bezier(0.22,1,0.36,1);
}

/* BASE */
*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-frame);
  color: var(--text-main);
}

/* APP FRAME */
.app-shell {
  background: var(--bg-body);
  min-height: 100vh;
  margin: 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3d), var(--shadow-glow);
  border: 6px solid var(--yellow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.topnav {
  background: var(--green);
  color: #fff;
  padding: 0 1.5rem;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: inset 0 -5px 10px rgba(0,0,0,0.35);
}
.topnav-left { display:flex; align-items:center; gap:0.9rem; }
.brand { display:flex; align-items:center; animation: logoEntry 0.8s var(--slow) forwards; transform-origin:left center; opacity:0; }
.brand-logo { height:50px; filter:drop-shadow(0 4px 6px rgba(0,0,0,0.35)); }

.topnav-center { display:flex; align-items:center; gap:0.75rem; }
.topnav-link {
  text-decoration:none;
  padding:0.45rem 0.9rem;
  border-radius:999px;
  font-size:0.9rem;
  font-weight:600;
  color:var(--yellow-soft);
  border:2px solid transparent;
  transition:var(--fast);
}
.topnav-link:hover { background:rgba(0,0,0,0.18); color:#fff; }
.topnav-link.active { border-color:var(--yellow); background:rgba(0,0,0,0.25); }

.topnav-right { display:flex; align-items:center; }
.icon-btn {
  background:transparent;
  border-radius:999px;
  border:2px solid rgba(255,255,255,0.6);
  padding:0.25rem 0.5rem;
  color:#fff;
  cursor:pointer;
  font-size:1rem;
  transition:var(--fast);
}
.icon-btn:hover { background:rgba(0,0,0,0.25); }

/* HAMBURGER */
.hamburger {
  display:none;
  background:none;
  border:none;
  padding:0.25rem;
  flex-direction:column;
  gap:4px;
  cursor:pointer;
}
.hamburger span { width:20px; height:2px; background:#fff; border-radius:4px; }

/* BODY LAYOUT */
.app-body { display:flex; flex:1; min-height:0; }

/* SIDEBAR */
.sidebar {
  width:250px;
  background:var(--green-dark);
  color:#fff;
  padding:1rem;
  display:flex;
  flex-direction:column;
  gap:0.5rem;
  box-shadow:inset -4px 0 10px rgba(0,0,0,0.4);
}
.sidebar-link {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0.4rem;
  text-decoration:none;
  font-size:0.95rem;
  font-weight:700;
  color:#111;
  background:linear-gradient(to bottom, var(--yellow-soft), var(--yellow));
  border-radius:999px;
  padding:0.6rem 0.9rem;
  border:3px solid var(--yellow);
  box-shadow:
    inset 0 3px 6px rgba(255,255,255,0.9),
    inset 0 -3px 5px rgba(0,0,0,0.2),
    0 6px 12px rgba(0,0,0,0.25);
  transition:var(--med);
}
.sidebar-link:hover {
  transform:translateX(5px);
  box-shadow:
    inset 0 4px 8px rgba(255,255,255,1),
    inset 0 -3px 6px rgba(0,0,0,0.25),
    0 10px 18px rgba(0,0,0,0.35);
}
.sidebar-icon {
  width:18px;
  height:18px;
}
.sidebar-icon svg {
  width:100%;
  height:100%;
  fill:none;
  stroke:#111;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* SIDEBAR OVERLAY (MOBILE) */
.sidebar-overlay { display:none; }

/* MAIN */
.page-main {
  flex:1;
  padding:1.75rem;
  background:#ffffff;
  position:relative;
}
.page-inner { animation:pageFadeIn var(--slow); }

.page-section { max-width:1120px; margin:0 auto; }
.page-header h1 { margin-bottom:0.25rem; }
.page-subtitle { margin-top:0; color:#555; }

/* GRID HELPERS */
.hero-grid {
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);
  gap:1.2rem;
  margin-bottom:1.5rem;
}
.grid-3 {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1rem;
}

/* HERO */
.hero-main { position:relative; }
.hero-title { margin-top:0; font-size:1.8rem; margin-bottom:0.4rem; }
.hero-subtitle { margin-top:0; margin-bottom:1rem; color:#555; }
.hero-actions { display:flex; gap:0.75rem; margin-bottom:1rem; }
.hero-metrics {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0.75rem;
  font-size:0.85rem;
}
.metric {
  padding:0.6rem 0.7rem;
  border-radius:999px;
  background:rgba(255,255,255,0.7);
  border:1px solid rgba(0,0,0,0.05);
}
.metric-label { display:block; opacity:0.7; }
.metric-value { font-weight:700; }

/* GLASS CARD & AVATAR */
.glass-card {
  background:radial-gradient(circle at top left, rgba(255,255,255,0.6), rgba(255,255,255,0.2));
  border-radius:var(--radius-lg);
  border:1px solid rgba(255,255,255,0.7);
  box-shadow:0 16px 40px rgba(0,0,0,0.15);
  backdrop-filter:blur(16px);
}
.hero-side { display:flex; flex-direction:column; gap:1rem; }

.ai-avatar-bubble {
  background:radial-gradient(circle at 10% 0%, #b2ff9e 0%, #0b7f32 40%, #02160a 100%);
  border-radius:var(--radius-lg);
  padding:1rem;
  color:#fff;
  display:flex;
  gap:0.9rem;
  align-items:center;
  box-shadow:0 10px 26px rgba(0,0,0,0.3), 0 0 16px rgba(255,255,255,0.15);
}
.ai-avatar-face {
  width:60px;
  height:60px;
  border-radius:999px;
  background:radial-gradient(circle at 30% 0%, #ffffff 0%, #b2ff9e 45%, #0b7f32 100%);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  box-shadow:0 0 12px rgba(255,255,255,0.65);
}
.ai-eyes, .ai-mouth { font-size:0.9rem; line-height:1; }

/* CARDS (3D) */
.card {
  background:var(--bg-body);
  padding:1.25rem 1.35rem;
  border-radius:var(--radius-lg);
  color:var(--text-main);
  border:4px solid var(--green);
  box-shadow:
    inset 0 3px 6px rgba(255,255,255,0.9),
    inset 0 -4px 7px rgba(0,0,0,0.16),
    0 8px 18px rgba(0,0,0,0.22),
    0 0 14px rgba(255,214,0,0.55);
  transition:transform var(--fast), box-shadow var(--fast);
}
.tilt-3d {
  transform-style:preserve-3d;
}
.tilt-3d:hover {
  transform:translateY(-4px) rotateX(1.2deg) rotateY(-1.5deg);
  box-shadow:
    inset 0 4px 8px rgba(255,255,255,1),
    inset 0 -4px 7px rgba(0,0,0,0.2),
    0 12px 24px rgba(0,0,0,0.3),
    0 0 18px rgba(255,214,0,0.8);
}

/* BUTTONS */
.btn-primary,
.btn-secondary {
  display:inline-block;
  text-decoration:none;
  border-radius:999px;
  font-weight:800;
  cursor:pointer;
  border:none;
}
.btn-primary {
  background:radial-gradient(circle at 30% 5%, var(--yellow-soft) 0%, var(--yellow) 55%, var(--yellow-deep) 100%);
  padding:0.85rem 1.4rem;
  border:3px solid var(--yellow);
  color:#111;
  box-shadow:
    inset 0 3px 6px rgba(255,255,255,0.9),
    inset 0 -3px 5px rgba(0,0,0,0.25),
    0 6px 14px rgba(0,0,0,0.3);
  transition:transform var(--fast), box-shadow var(--fast);
}
.btn-primary:hover {
  transform:translateY(-4px);
  box-shadow:
    inset 0 4px 8px rgba(255,255,255,1),
    inset 0 -3px 5px rgba(0,0,0,0.28),
    0 12px 22px rgba(0,0,0,0.4);
}
.cta-pulse { animation:ctaPulse 1.7s ease-in-out infinite; }

.btn-secondary {
  padding:0.8rem 1.2rem;
  background:#f4f4f4;
  color:#222;
  border:2px solid #ddd;
}

/* FORMS & FIELDS */
.field { display:flex; flex-direction:column; margin-bottom:0.9rem; }
.field span { font-size:0.9rem; margin-bottom:0.25rem; }
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  padding:0.55rem 0.7rem;
  border-radius:10px;
  border:1px solid #ddd;
  font-size:0.95rem;
}
textarea { resize:vertical; }

/* PILLS */
.pill-row { display:flex; gap:0.4rem; }
.pill {
  padding:0.35rem 0.75rem;
  border-radius:999px;
  border:1px solid #ccc;
  background:#f5f5f5;
  font-size:0.85rem;
}
.pill.active {
  background:var(--green);
  color:#fff;
  border-color:var(--green-dark);
}

/* TIPS */
.tips-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0.75rem;
}
.tips-card {
  background:#fafafa;
  border-radius:12px;
  padding:0.7rem;
  font-size:0.85rem;
}

/* CHAT AREA */
.chat-window {
  background:#fafafa;
  border-radius:12px;
  padding:0.8rem;
  max-height:260px;
  overflow-y:auto;
  margin-bottom:0.7rem;
}
.chat-bubble {
  max-width:80%;
  padding:0.55rem 0.75rem;
  border-radius:12px;
  margin-bottom:0.45rem;
  font-size:0.9rem;
}
.chat-bubble.from-ai {
  background:#e8f5e9;
}
.chat-bubble.from-user {
  background:#e3f2fd;
  margin-left:auto;
}
.scenario-chat-input textarea {
  width:100%;
}

/* SCENARIO V2 GRID */
.scenario-grid {
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(0,1.3fr);
  gap:1rem;
}
.scenario-chat-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:0.4rem;
}
.scenario-status {
  display:flex;
  align-items:center;
  gap:0.35rem;
  font-size:0.85rem;
}
.status-dot {
  width:10px;
  height:10px;
  border-radius:999px;
  background:#22c55e;
  box-shadow:0 0 6px rgba(34,197,94,0.8);
}

/* SUMMARY */
.scenario-summary {
  margin-top:0.8rem;
  padding:0.8rem;
  font-size:0.88rem;
}

/* FOOTER */
.app-footer {
  background:var(--green-dark);
  color:#fff;
  padding:0.6rem 1.5rem;
  display:flex;
  align-items:center;
  justify-content:space_between;
  font-size:0.9rem;
  box-shadow:inset 0 4px 10px rgba(0,0,0,0.4);
}

/* ANIMATIONS */
@keyframes pageFadeIn {
  from { opacity:0; transform:translateY(10px); }
  to { opacity:1; transform:translateY(0); }
}
@keyframes logoEntry {
  0% { transform:translateY(-10px) scale(0.9); opacity:0; }
  60% { transform:translateY(2px) scale(1.02); opacity:1; }
  100% { transform:translateY(0) scale(1); opacity:1; }
}
@keyframes ctaPulse {
  0%,100% {
    transform:translateY(0) scale(1);
    box-shadow:
      inset 0 3px 6px rgba(255,255,255,0.9),
      inset 0 -3px 5px rgba(0,0,0,0.25),
      0 6px 14px rgba(0,0,0,0.3);
  }
  50% {
    transform:translateY(-2px) scale(1.03);
    box-shadow:
      inset 0 4px 7px rgba(255,255,255,1),
      inset 0 -3px 5px rgba(0,0,0,0.28),
      0 10px 18px rgba(0,0,0,0.35);
  }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .topnav-center { display:none; }
  .hamburger { display:flex; }
  .sidebar {
    position:fixed;
    inset:0 auto 0 0;
    max-width:260px;
    transform:translateX(-100%);
    transition:transform var(--med);
    z-index:30;
  }
  .sidebar.open { transform:translateX(0); }
  .sidebar-overlay {
    display:block;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.45);
    opacity:0;
    pointer-events:none;
    transition:opacity var(--fast);
    z-index:20;
  }
  .sidebar-overlay.visible {
    opacity:1;
    pointer-events:auto;
  }
  .page-main { padding:1rem; }
  .hero-grid,
  .scenario-grid,
  .grid-3 {
    grid-template-columns:minmax(0,1fr);
  }
}
