:root {
  --bg-color: #F8FAFC;
  --text-main: #2D3748;
  --text-muted: #4A5568;
  --card-bg: #FFFFFF;
  --primary: #319795;
  --primary-text: #FFFFFF;
  --accent: #FC8181;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --glass: rgba(255, 255, 255, 0.9);
}

.dark-mode {
  --bg-color: #171923;
  --text-main: #F7FAFC;
  --text-muted: #CBD5E0;
  --card-bg: #2D3748;
  --primary: #81E6D9;
  --primary-text: #171923;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --glass: rgba(23, 25, 35, 0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 3rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: var(--glass);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.logo-container {
  display: flex;
  align-items: center;
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  display: flex;
  align-items: center;
  position: relative;
  margin-left: 10px;
}

.morph-text {
  display: inline-block;
  transition: all 0.4s ease;
}

.logo-container:hover .morph-text {
  opacity: 0;
  transform: translateX(10px);
}

.brand-title::after {
  content: '+ Upper';
  position: absolute;
  left: 100%;
  margin-left: -1.2em;
  opacity: 0;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.4s ease;
  transform: translateX(-15px);
  pointer-events: none;
}

.logo-container:hover .brand-title::after {
  opacity: 1;
  transform: translateX(0);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-item {
  cursor: pointer;
  font-weight: 500;
  color: var(--text-main);
}
.nav-item:hover { color: var(--primary); }
.sos-container { position: relative; }

.sos-pulse {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  animation: pulse 2s infinite;
  display: block;
}

.sos-dropdown {
  position: absolute;
  top: 60px;
  right: 0;
  width: 300px;
  background: var(--card-bg);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 2000;
  text-align: center;
  transform-origin: top right;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(252, 129, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(252, 129, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(252, 129, 129, 0); }
}

@keyframes slideIn {
  0% { opacity: 0; transform: translateY(-10px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 4rem 4rem 4rem;
  position: relative;
  width: 100%;
  overflow: hidden;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  width: 100%;
  gap: 1rem;
  z-index: 2;
}

.hero-text {
  flex: 1;
  text-align: left;
  min-width: 40%;
  z-index: 3;
}

.hero-image {
  flex: 1.2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.floating-img {
  width: 100%;
  max-width: 600px;
  height: auto;
  object-fit: contain;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.subtitle {
  font-size: clamp(2rem, 3.5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 600;
  white-space: nowrap;
}

.highlight { color: var(--primary); }

.description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 900px;
  font-weight: 300;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-text);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: transform 0.2s;
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.9rem 2.5rem;
  border-radius: 50px;
  font-size: 1.1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-primary:hover, .btn-secondary:hover { transform: translateY(-3px); }
.btn-secondary:hover { background-color: rgba(49, 151, 149, 0.1); }

.background-mesh {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  background: radial-gradient(circle at 15% 25%, rgba(83, 198, 196, 0.35) 0%, transparent 45%),
              radial-gradient(circle at 85% 75%, rgba(237, 151, 151, 0.35) 0%, transparent 45%);
  filter: blur(60px);
  pointer-events: none;
}

.dashboard-container {
  display: flex;
  height: 100vh;
  padding-top: 80px;
  background: transparent;
}

.app-nav {
  width: 90px;
  height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2rem;
  gap: 1.5rem;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(0,0,0,0.05);
  position: fixed;
  left: 0; top: 80px;
  z-index: 900;
}

.nav-btn {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.nav-btn .icon { font-size: 1.5rem; 
    margin-bottom: 2px; }
.nav-btn .label { 
  font-size: 0.65rem; 
  font-weight: 600; }

.nav-btn:hover { 
  background: rgba(0,0,0,0.04); 
  color: var(--primary); }
.nav-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(49, 151, 149, 0.3);
}

.content-area {
  margin-left: 90px;
  flex-grow: 1;
  padding: 2rem;
  overflow-y: auto;
  position: relative;
}

.center-stage, .chat-window {
  max-width: 900px;
  margin: 0 auto;
  background: var(--glass);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  height: 80vh;        
  overflow: hidden;    
  display: flex;       
  flex-direction: column;
}

.chat-history { 
  flex-grow: 1; 
  overflow-y: auto; 
  padding: 1rem; 
  display: flex; 
  flex-direction: column; 
  gap: 1rem;
  
  min-height: 0; 
  scroll-behavior: smooth;
}
.bot-msg, .user-msg {
  padding: 0.8rem 1.2rem;
  border-radius: 15px;
  max-width: 80%;
  line-height: 1.4;
}

.bot-msg { background: var(--bg-color); align-self: flex-start; border-bottom-left-radius: 2px; }
.user-msg { background: var(--primary); color: white; align-self: flex-end; border-bottom-right-radius: 2px; }

.chat-input-area { margin-top: 1rem; display: flex; gap: 0.5rem; }

#user-input {
  flex-grow: 1; padding: 1rem;
  border: 2px solid var(--bg-color);
  border-radius: 50px; outline: none;
}

.send-btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--primary);
  border: none; cursor: pointer; color: white;
}


.status-dot {
  font-size: 0.8rem; color: #48BB78;
  background: rgba(72, 187, 120, 0.15);
  padding: 2px 8px; border-radius: 10px; font-weight: 600;
}

.modal-overlay {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(23, 25, 35, 0.6);
  backdrop-filter: blur(12px);
  z-index: 3000;
  display: flex; justify-content: center; align-items: center;
  opacity: 0; visibility: hidden;
  transition: all 0.4s ease;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-box {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 24px;
  max-width: 650px; width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(20px); transition: transform 0.4s;
  text-align: center;
}

.modal-overlay.active .modal-box { transform: translateY(0); }
.vision-title { font-family: 'Playfair Display', serif; font-size: 2.5rem; margin-bottom: 1.5rem; }
.vision-text { font-size: 1.1rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 2rem; }
.highlight-vision { color: var(--primary); font-weight: 600; white-space: nowrap; }
.close-vision-btn { position: absolute; top: 20px; right: 25px; background: none; 
    border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; }

.btn-sos-option {
  width: 100%; padding: 10px; margin-bottom: 10px;
  border: 2px solid var(--accent); background: transparent; color: var(--accent);
  border-radius: 8px; font-weight: bold; cursor: pointer;
}
.btn-sos-option:hover { background: var(--accent); color: white; }

.music-wrapper { position: relative; display: flex; align-items: center; justify-content: center; }

.music-btn {
  font-size: 1.5rem; cursor: pointer;
  width: 45px; height: 45px;
  display: flex; justify-content: center; align-items: center;
  transform-origin: center center;
  border-radius: 50%; box-sizing: border-box; 
  user-select: none; transition: transform 0.5s ease;
}

.rotating { 
    animation: spin 4s linear infinite; 
    color: var(--primary); 
    text-shadow: 0 0 15px var(--primary); }
@keyframes spin { 100% { transform: rotate(360deg); } }

.volume-tooltip {
  position: absolute; 
  top: 40px; left: 50%; 
  transform: translateX(-50%);
  background: var(--glass); 
  backdrop-filter: blur(10px);
  padding: 8px 12px; 
  border-radius: 20px;
  box-shadow: var(--shadow);
  opacity: 0; 
  visibility: hidden;
  transition: all 0.3s ease; 
  border: 1px solid rgba(0,0,0,0.1);
}

.music-wrapper:hover .volume-tooltip { opacity: 1; visibility: visible; top: 50px; }
.volume-tooltip input[type=range] { width: 80px; cursor: pointer; accent-color: var(--primary); height: 4px; }

.streak-wrapper {
  position: absolute; top: 20px; right: 30px;
  z-index: 100; cursor: pointer;
}

.streak-icon {
  background: var(--card-bg);
  padding: 8px 15px; border-radius: 50px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 8px;
  border: 2px solid var(--bg-color);
  transition: all 0.3s ease; 
}

.streak-number { font-size: 1.2rem; font-weight: 800; color: #DD6B20; }
.streak-wrapper:hover .streak-icon { transform: scale(1.05); }

.streak-tooltip {
  position: absolute; top: 55px; right: 0; width: 200px;
  background: var(--card-bg);
  padding: 15px; border-radius: 12px;
  box-shadow: var(--shadow); 
  opacity: 0; visibility: hidden;
  transform: translateY(-10px); transition: all 0.3s ease;
  border: 1px solid var(--bg-color);
  text-align: center;
  z-index: 101;
}

.streak-tooltip h4 { color: #DD6B20; margin-bottom: 5px; }
.streak-tooltip p { color: var(--text-muted); font-size: 0.9rem; } 

.streak-wrapper:hover .streak-tooltip { opacity: 1; visibility: visible; transform: translateY(0); }

.meditation-container {
  display: flex; flex-direction: column;
  align-items: center; 
  justify-content: center;
  height: 100%; 
  text-align: center;
}

.breathing-circle {
  width: 120px; height: 120px;
  background: var(--primary); border-radius: 50%;
  margin: 2rem 0; opacity: 0.8;
  box-shadow: 0 0 25px var(--primary);
  animation: breathe 16s infinite ease-in-out;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  25% { transform: scale(1.8); opacity: 1; }
  50% { transform: scale(1.8); opacity: 1; }
  75% { transform: scale(1); opacity: 0.6; }
}

.hidden { display: none !important; }
.mobile-text { display: none; }
.placeholder-box { margin-top: 20px; 
    padding: 40px; 
    border: 2px dashed var(--text-muted); 
    border-radius: 15px; 
    opacity: 0.5; }

@media (max-width: 968px) {
  .hero-container { flex-direction: column-reverse; 
    text-align: center; 
    gap: 2rem; 
    padding-top: 2rem; }
  .hero-text { 
    width: 100%; }
  .hero-image { justify-content: center; }
  .floating-img { max-width: 350px; }
  .subtitle { white-space: normal; 
    font-size: 2.5rem; }
  .cta-buttons { justify-content: center; }
  .app-nav {
    width: 100%; 
    height: 70px;
    top: auto; bottom: 0; left: 0;
    flex-direction: row; 
    justify-content: space-evenly;
    padding-top: 0; 
    border-right: none;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px 20px 0 0;
  }

  .nav-btn { width: auto; 
    height: 100%; 
    border-radius: 0; 
    background: none !important; }
  .nav-btn .label { display: none; }
  .nav-btn .icon { 
    font-size: 1.8rem; 
    margin-bottom: 0; }
  .nav-btn.active { color: var(--primary); 
    box-shadow: none; }
  .nav-btn.active::after {
    content: ''; display: block; width: 6px; height: 6px;
    background: var(--primary); 
    border-radius: 50%; 
    margin-top: 4px;
  }

  .content-area { margin-left: 0; 
    padding: 1rem; 
    padding-bottom: 100px; }
  .streak-wrapper { top: 10px; 
    right: 15px; }
  .streak-icon { padding: 5px 10px; }
}

@media (max-width: 600px) {
  .desktop-text { display: none; }
  .mobile-text { display: inline; }
  .navbar { padding: 0.8rem 1rem; }
  .nav-links { gap: 0.8rem; }
  .brand-title { font-size: 1.4rem; } 
  .logo-container svg { width: 22px; height: 22px; }
  .sos-pulse { padding: 0.5rem 1rem; font-size: 0.9rem; }
  #tab-breathe .center-stage > div:first-child {
    top: 40px !important;
    padding: 0 10px;
  }
  .session-timer {
    font-size: 0.9rem;
    padding: 2px 8px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
  }
    
  .info-wrapper {
      margin-top: 5px; 
  }
}

.info-wrapper { position: relative; cursor: pointer; }
.info-icon {
    width: 28px; height: 28px;
    border: 2px solid var(--text-muted); color: var(--text-muted);
    border-radius: 50%; font-weight: bold; font-family: monospace;
    display: flex; justify-content: center; align-items: center;
    transition: all 0.3s;
}
.info-wrapper:hover .info-icon { border-color: var(--primary); color: var(--primary); background: rgba(49, 151, 149, 0.1); }

.info-tooltip {
    position: absolute; 
    top: 35px; 
    left: 0; 
    width: 220px;
    background: var(--card-bg); 
    padding: 12px; 
    border-radius: 12px;
    box-shadow: var(--shadow); 
    border: 1px solid rgba(0,0,0,0.1);
    font-size: 0.85rem; 
    color: var(--text-main); 
    line-height: 1.5;
    opacity: 0; 
    visibility: hidden; 
    transform: translateY(-5px);
    transition: all 0.3s ease; 
    text-align: left; 
    pointer-events: none;
}
.info-wrapper:hover .info-tooltip { opacity: 1; visibility: visible; transform: translateY(0); }

.session-timer {
    font-family: monospace; font-size: 1.2rem; color: var(--text-muted);
    background: rgba(0,0,0,0.05); 
    padding: 4px 10px; 
    border-radius: 8px;
}

.orb-container {
    position: relative;
    width: 280px; height: 280px;
    display: flex; justify-content: center; align-items: center;
    margin: 0 auto;
}
.orb-core {
    width: 100%; height: 100%;
    background: radial-gradient(circle at 30% 30%, #81E6D9, var(--primary));
    border-radius: 50%;
    box-shadow: 0 0 30px var(--primary);
    opacity: 0.9;
    transition: all 1s;
}
.orb-text {
    position: absolute;
    font-size: 1.5rem; 
    font-weight: 700; color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    pointer-events: none; z-index: 5;
}

.control-panel {
    margin-top: 2rem;
    height: 80px;
    display: flex; justify-content: center; align-items: center;
}

.control-row {
    display: flex; gap: 20px; justify-content: center; width: 100%;
}

.control-btn-main {
    width: 70px; height: 70px;
    border-radius: 50%;
    font-size: 2rem;
    padding: 0;
    display: flex; justify-content: center; align-items: center;
    padding-left: 5px;
    box-shadow: 0 10px 25px rgba(49, 151, 149, 0.4);
    transition: transform 0.2s;
}
.control-btn-main:hover { transform: scale(1.1); }
.control-btn-sub {
    width: 60px; height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex; justify-content: center; 
    align-items: center;
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    transition: all 0.2s;
    padding: 0;

}
.control-btn-sub:hover { background: rgba(49, 151, 149, 0.1); transform: scale(1.05); }

.stop-btn {
    border-color: var(--accent); color: var(--accent);
}
.stop-btn:hover { background: rgba(252, 129, 129, 0.1); }

.orb-shape {
    width: 130px; 
    height: 130px;
    background: rgba(49, 151, 149, 0.2); 
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    will-change: width, height;
    transition-property: width, height;
}

.orb-shape.expanded {
    width: 260px;
    height: 260px;
}

.orb-core.pulse {
    animation: heartbeat 1.2s infinite;
    background: radial-gradient(circle at 30% 30%, #FEB2B2, #FC8181);
    box-shadow: 0 0 60px rgba(252, 129, 129, 0.6);
}

@keyframes heartbeat {
    0%   { transform: scale(0.95); opacity: 0.9; }
    15%  { transform: scale(1.08); opacity: 1; }
    30%  { transform: scale(0.95); opacity: 0.9; }
    45%  { transform: scale(1.03); opacity: 1; }
    60%  { transform: scale(0.95); opacity: 0.9; }
    100% { transform: scale(0.95); opacity: 0.9; }
}

.stop-btn svg { fill: var(--accent); }
.stop-btn:hover svg { fill: #c53030; }

.void-stage {
    position: relative;
    overflow: hidden; 
}

.void-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.black-hole {
    width: 120px;
    height: 120px;
    background: black;
    border-radius: 50%;
    box-shadow: 
        0 0 20px #4b0082,
        0 0 40px #800080, 
        0 0 60px #2D3748;
    position: relative;
    animation: pulseVoid 3s infinite alternate;
    
    transition: transform 3s ease-in-out, box-shadow 3s ease-in-out;
}

.black-hole::before, .black-hole::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: transparent;
    border: 2px solid transparent;
}

.black-hole::before {
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    border-top-color: rgba(138, 43, 226, 0.6);
    animation: spinVoid 4s linear infinite;
}

.black-hole::after {
    top: -20px; left: -20px; right: -20px; bottom: -20px;
    border-bottom-color: rgba(75, 0, 130, 0.4);
    animation: spinVoid 7s linear infinite reverse;
}

.vent-input-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    transition: all 2.5s cubic-bezier(0.4, 0, 0.2, 1); 
    transform-origin: center top; 
}

#vent-input {
    width: 100%;
    padding: 1.5rem;
    border-radius: 20px;
    border: 2px solid rgba(0,0,0,0.1);
    background: rgba(30, 30, 30, 0.8);
    color: white; 
    font-family: inherit;
    font-size: 1.1rem;
    min-height: 150px;
    resize: none;
    outline: none;
}
#vent-input::placeholder { color: rgba(255,255,255,0.5); }


.sucked-in {
    transform: translateY(-180px) scale(0); 
    opacity: 0;
    filter: blur(20px);
}
.black-hole.eating {
    transform: scale(1.3);
    box-shadow: 
        0 0 50px #4b0082, 
        0 0 80px #800080, 
        0 0 100px #2D3748,
        inset 0 0 40px #000;
}

@keyframes spinVoid {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseVoid {
    0% { box-shadow: 0 0 20px #4b0082, 0 0 40px #800080; transform: scale(1); }
    100% { box-shadow: 0 0 30px #4b0082, 0 0 70px #800080; transform: scale(1.05); }
}

#void-message {
    margin-top: 2rem;
    text-align: center;
    animation: fadeIn 1s ease;
}

.void-btn {
    width: 100%;
    margin-top: 1rem;
    background-color: #4a5568;
    color: white !important;
    border: none;
    padding: 1rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
}

.void-btn:hover {
    background-color: #2D3748;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(75, 0, 130, 0.4);
}

.games-stage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 80vh;
}
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 900px;
    margin: 3rem 0;
}

.game-card {
    position: relative;
    height: 280px;
    border-radius: 24px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.card-bubble { background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(135, 206, 235, 0.1) 100%); }
.card-zen { background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255, 215, 0, 0.1) 100%); }
.card-match { background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(72, 187, 120, 0.1) 100%); }

.game-icon-lg { font-size: 4rem; margin-bottom: 15px; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2)); }
.game-card h3 { font-size: 1.5rem; margin-bottom: 10px; color: var(--text-main); }

.game-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 20px; }

.play-tag {
    background: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.game-card:hover .play-tag {
    opacity: 1;
    transform: translateY(0);
}

.games-footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    width: 100%;
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .games-grid { grid-template-columns: 1fr;}
    .game-card { height: 200px; flex-direction: row; text-align: left; padding: 20px; }
    .game-icon-lg { font-size: 3rem; margin-bottom: 0; margin-right: 20px; }
    .play-tag { display: none;}
    .games-footer { display: none; }
}

#zen-canvas {
    width: 100%;
    max-width: 800px;
    
    height: 50vh; 
    min-height: 300px;
    
    background: #000;
    border-radius: 20px;
    cursor: crosshair;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
    touch-action: none;
    margin: 0 auto;
    display: block;
}

.memory-card {
    aspect-ratio: 1;
    background: rgba(49, 151, 149, 0.15);
    border: 1px solid rgba(49, 151, 149, 0.3);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: transparent;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.memory-card:hover {
    transform: translateY(-2px);
    background: rgba(49, 151, 149, 0.25);
}

.memory-card.flipped, .memory-card.matched {
    background: white;
    color: black;
    transform: rotateY(180deg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: white;
}

.memory-card.matched {
    background: #48BB78;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.game-stage-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.game-top-bar {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
    padding-left: 10px;
}

.icon-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: rgba(49, 151, 149, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
}

.back-btn { margin-right: auto; }
.restart-btn { border-color: var(--primary); color: var(--primary); }
.game-controls-center {
    margin-top: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 10px;
  width: 100%;
  margin: 0 auto;
  max-width: 360px; 
}
.bubble-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    min-height: 300px; /*safe barrier for js*/ 
}

.bubble {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(174, 216, 230, 0.6));
  box-shadow: 3px 3px 6px rgba(0,0,0,0.1), inset -2px -2px 5px rgba(0,0,0,0.05);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.4);
  transition: transform 0.1s;
}
.bubble:active { transform: scale(0.9); }
.bubble.popped {
    background: rgba(174, 216, 230, 0.15);
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
    transform: scale(0.85);
    border-color: transparent;
}

@media (max-width: 600px) {
  .bubble-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 15px;
  }
}

.game-internal-header {
  text-align: center;
  margin-bottom: 20px;
  animation: fadeIn 0.5s ease;
}

.game-internal-header h3 {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 5px;
}

.game-internal-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  opacity: 0.8;
}

@media (min-width: 969px) { 
    .app-nav {
        width: auto; 
        height: auto;
        min-height: 0;
        border-right: none;
        background: none; 

        position: fixed;
        left: 24px;
        top: 55%;
        transform: translateY(-50%);
        z-index: 1000;

        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 50px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);

        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 30px 15px;
    }

    .nav-btn {
        width: 55px;
        height: 55px;
        border-radius: 50%;
        position: relative;
        
        display: flex;
        align-items: center;
        justify-content: center;
        
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        color: var(--text-muted);
    }
    .nav-btn .icon {
        font-size: 1.6rem;
        margin-bottom: 0;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    }

    .nav-btn:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        transform: scale(1.15);
        color: var(--primary);
    }

    .nav-btn.active {
        background: var(--primary) !important;
        color: #fff !important;
        box-shadow: 0 0 25px var(--primary);
        transform: scale(1.1);
    }
    
    .nav-btn .label {
        display: block;
        position: absolute;
        left: 75px;
        top: 50%;
        transform: translateY(-50%) translateX(-15px) scale(0.9);
        
        background: rgba(0, 0, 0, 0.9);
        color: #fff;
        padding: 6px 14px;
        border-radius: 12px;
        font-size: 0.85rem;
        font-weight: 600;
        white-space: nowrap;
        border: 1px solid rgba(255,255,255,0.15);
        
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.2s ease-out;
        z-index: 2000;
    }
    .nav-btn .label::before {
        content: '';
        position: absolute;
        left: -4px;
        top: 50%;
        transform: translateY(-50%);
        border-width: 5px;
        border-style: solid;
        border-color: transparent rgba(0,0,0,0.9) transparent transparent;
    }

    .nav-btn:hover .label {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%) translateX(0) scale(1);
    }

    .content-area {
        margin-left: 100px;
    }
}

@media (max-width: 600px) {
    .center-stage h2 {
        margin-top: 3.5rem !important;
    }
    
    .info-wrapper {
        margin-left: -5px;
    }
}

body, 
.navbar, 
.app-nav, 
.center-stage, 
.chat-window, 
.void-card,
.nav-btn,
input, 
textarea, 
button {
    transition: background-color 0.6s ease, 
                color 0.6s ease, 
                border-color 0.6s ease, 
                box-shadow 0.6s ease,
                transform 0.3s ease;
}

.ripple-overlay {
    position: fixed;
    border-radius: 50%;
    background: #171923; 
    z-index: 9999;
    pointer-events: none;
    
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.ripple-active {
    transform: translate(-50%, -50%) scale(250); 
}

.ripple-fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}