:root {
  /* Color Palette - Dark Premium */
  --bg-primary: #121212;
  --bg-secondary: #1a1a1a;
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

  /* Layout */
  --container-max-width: 1200px;
  --nav-height: 80px;
  --section-spacing: 120px;

  /* Typography */
  --font-heading: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

a {
  color: white;
  text-decoration: none;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(
      circle at 20% 30%,
      rgba(99, 102, 241, 0.05) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(139, 92, 246, 0.05) 0%,
      transparent 40%
    );
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.05;
  z-index: 9999;
}

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(18, 18, 18, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-primary);
}

.logo span {
  color: var(--accent-primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Dropdown Menu Styles */
.dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.dropdown > a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.dropdown > a i {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 15rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: var(--card-shadow);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown:hover > a i {
  transform: rotate(180deg);
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu a {
  display: block;
  padding: 0.8rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  .dropdown {
    flex-direction: column;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    min-width: 0;
    padding: 0;
    margin-top: 1rem;
    display: none;
    /* Hide submenu initially on mobile */
  }

  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu {
    display: flex;
  }

  .dropdown-menu a {
    font-size: 1.1rem !important;
    /* Force smaller size so it fits inside mobile nav */
    padding: 0.5rem 0 !important;
    opacity: 0.8 !important;
    transform: translateY(0) !important;
  }
}

.mobile-menu-btn {
  display: none;
  cursor: pointer;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: var(--nav-height);
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  z-index: 2;
}

.sub-hero {
  font-family: var(--font-heading);
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
  font-weight: 500;
}

.main-title {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 2.5rem;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
}

.btn {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  font-family: var(--font-heading);
  cursor: pointer;
  color: white;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  border: none;
  box-shadow: 0 10px 20px -10px var(--accent-primary);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 25px -10px var(--accent-primary);
}

.btn-outline {
  border: 1.5px solid var(--accent-primary);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-3px);
}

.hero-visual {
  position: relative;
  height: 400px;
}

.blob-container {
  position: absolute;
  width: 100%;
  height: 100%;
  filter: blur(80px);
  opacity: 0.6;
}

.blob {
  position: absolute;
  border-radius: 50%;
  animation: blob-float 10s infinite alternate;
}

.blob-1 {
  width: 300px;
  height: 300px;
  background: var(--accent-primary);
  top: 10%;
  left: 10%;
}

.blob-2 {
  width: 250px;
  height: 250px;
  background: var(--accent-secondary);
  bottom: 10%;
  right: 10%;
  animation-delay: -3s;
}

.blob-3 {
  width: 200px;
  height: 200px;
  background: #4f46e5;
  top: 50%;
  left: 50%;
  animation-delay: -6s;
}

@keyframes blob-float {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(30px, -50px) scale(1.1);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) translateX(-50%);
  }

  40% {
    transform: translateY(-10px) translateX(-50%);
  }

  60% {
    transform: translateY(-5px) translateX(-50%);
  }
}

/* Sections */
.section-padding {
  padding: var(--section-spacing) 0;
}

.secondary-bg {
  background-color: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-subtitle {
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.about-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 3rem 2rem;
  border-radius: 24px;
  transition: all 0.4s ease;
  cursor: default;
}

.about-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent-primary);
}

.about-card h3 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.about-card p {
  color: var(--text-secondary);
}

/* Passions Section */
.passions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.passion-item {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
}

.passion-img {
  height: 300px;
  overflow: hidden;
}

.passion-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.passion-item:hover .passion-img img {
  transform: scale(1.05);
}

.passion-info {
  padding: 2rem;
}

.passion-info h3 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.passion-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  letter-spacing: 1.5px;
}

.music-badges,
.passion-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.music-badges span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.passion-stats span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.passion-stats i {
  width: 16px;
  height: 16px;
  color: var(--accent-secondary);
}

.passion-info p {
  color: var(--text-secondary);
}

/* Projects Section */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

.project-card {
  display: flex;
  gap: 4rem;
  align-items: center;
}

.project-card.reverse {
  flex-direction: row-reverse;
}

.project-image {
  flex: 1;
  border-radius: 24px;
  overflow: hidden;
  height: 400px;
  position: relative;
  border: 1px solid var(--glass-border);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-item:hover .project-image img {
  transform: scale(1.05);
}

.link-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
}

.project-details {
  flex: 0.8;
}

.project-tags {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.project-tags span {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(99, 102, 241, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
}

.project-details h3 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.project-details p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Contact Section */
.contact {
  padding: 60px 0 !important;
}

.contact-info-only {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-info-only .section-title {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 3.5rem;
  line-height: 1.2;
}

.contact-info-only p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact-methods {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-method-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.contact-method-card:hover {
  transform: translateX(10px);
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
}

.contact-method-card i {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
}

.contact-method-card h4 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.contact-method-card span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Footer */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--glass-border);
  margin-top: 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 1024px) {
  .main-title {
    font-size: 3.5rem;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-visual {
    display: none;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
    color: var(--text-primary);
    z-index: 1001;
  }

  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(18, 18, 18, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.3s ease;
  }

  .nav-links.active a {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links.active li:nth-child(1) a {
    transition-delay: 0.1s;
  }

  .nav-links.active li:nth-child(2) a {
    transition-delay: 0.2s;
  }

  .nav-links.active li:nth-child(3) a {
    transition-delay: 0.3s;
  }

  .nav-links.active li:nth-child(4) a {
    transition-delay: 0.4s;
  }

  .nav-links.active li:nth-child(5) a {
    transition-delay: 0.5s;
  }

  .section-spacing {
    --section-spacing: 80px;
  }

  .main-title {
    font-size: 2.8rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .passions-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-card,
  .project-card.reverse {
    flex-direction: column;
    gap: 2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-info .section-title {
    text-align: center;
    font-size: 2.5rem;
  }

  .contact-info p {
    text-align: center;
    margin: 0 auto 3rem;
  }

  .contact-form-container {
    padding: 2rem 1.5rem;
  }
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.17, 0.55, 0.55, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  animation: fadeIn 1s ease forwards;
}

.fade-in-up {
  animation: fadeInUp 1s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Game Modal Styles */
.game-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
}

.game-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.game-container {
  position: relative;
  width: 90vw;
  height: 80vh;
  max-width: 1000px;
  max-height: 700px;
  background: #000;
  border: 2px solid var(--accent-primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(99, 102, 241, 0.3);
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.close-game {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2100;
  transition: all 0.3s ease;
}

.close-game:hover {
  background: var(--accent-primary);
  transform: rotate(90deg);
}

#game-ui {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2050;
  pointer-events: none;
}

.ui-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "Press Start 2P", cursive;
  color: #fff;
  font-size: 0.8rem;
  text-shadow: 0 0 10px var(--accent-primary);
}

#game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2060;
  text-align: center;
}

.overlay-content {
  padding: 2rem;
}

.retro-title {
  font-family: "Press Start 2P", cursive;
  font-size: 3rem;
  color: #4ade80;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
  animation: titlePulse 2s infinite alternate;
}

@keyframes titlePulse {
  from {
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
    transform: scale(1);
  }

  to {
    text-shadow: 0 0 30px rgba(74, 222, 128, 0.8);
    transform: scale(1.05);
  }
}

.overlay-content p {
  font-family: "Press Start 2P", cursive;
  font-size: 1rem;
  margin-bottom: 2rem;
  color: #fff;
}

.controls-hint {
  margin-top: 2rem;
  color: var(--text-muted);
}

.controls-hint p {
  font-size: 0.6rem;
  margin-bottom: 0.5rem;
}

/* Mobile Controls */
.mobile-controls {
  position: absolute;
  bottom: 30px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 2070;
  pointer-events: none;
  display: none;
  /* Shown via JS on mobile */
}

.movement-btns {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  pointer-events: auto;
}

.control-btn {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
}

.vertical-btns {
  margin-bottom: 40px;
}

.shoot-btn {
  width: 80px;
  height: 80px;
  background: rgba(239, 68, 68, 0.2);
  border: 3px solid #ef4444;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  touch-action: manipulation;
}

.shoot-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 15px #ef4444;
}

.control-btn:active,
.shoot-btn:active {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0.95);
}

@media (max-width: 768px) {
  .game-container {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border: none;
    border-radius: 0;
  }

  .mobile-controls {
    display: flex;
  }

  .retro-title {
    font-size: 1.5rem;
  }

  .overlay-content p {
    font-size: 0.7rem;
  }
}

/* Store Page Styles */
.section-desc {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 1rem auto 0;
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: center;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.store-card {
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.store-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.2);
}

.store-card-img {
  height: 300px;
  overflow: hidden;
  position: relative;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.store-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.store-card:hover .store-card-img img {
  transform: scale(1.05) translateY(-5px);
}

.store-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.store-card:hover .store-card-overlay {
  opacity: 1;
}

.store-card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.store-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--accent-primary);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.store-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.store-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* AI Chat Widget */
.ai-chat-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  font-family: var(--font-body);
}

.ai-chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #1a1a1a;
  color: white;
  border: 2px solid rgba(204, 255, 0, 0.4);
  box-shadow: 0 4px 20px rgba(204, 255, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  position: relative;
  overflow: visible;
}

.ai-chat-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 25px rgba(204, 255, 0, 0.5);
}

/* Pulse glow ring behind toggle */
.ai-chat-toggle::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(204, 255, 0, 0.4), rgba(180, 230, 0, 0.1));
  opacity: 0;
  animation: pulse-ring 2.5s ease-out infinite;
  z-index: -1;
}

.ai-chat-toggle.chat-open::before {
  animation: none;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  70% { transform: scale(2); opacity: 0; }
  100% { transform: scale(2); opacity: 0; }
}

/* Bot SVG icon */
.bot-svg-icon {
  width: 28px;
  height: 28px;
  animation: bot-bounce 2.5s ease-in-out infinite;
}

@keyframes bot-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.ai-chat-toggle i {
  width: 24px;
  height: 24px;
}

/* Wave emoji */
.bot-wave-emoji {
  position: absolute;
  top: -4px;
  right: -6px;
  font-size: 16px;
  animation: wave-hand 1.8s ease-in-out 3;
  transform-origin: 70% 70%;
}

@keyframes wave-hand {
  0%   { transform: rotate(0deg); }
  10%  { transform: rotate(14deg); }
  20%  { transform: rotate(-8deg); }
  30%  { transform: rotate(14deg); }
  40%  { transform: rotate(-4deg); }
  50%  { transform: rotate(10deg); }
  60%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

/* Floating tooltip speech bubble */
.ai-chat-tooltip {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: rgba(99, 102, 241, 0.95);
  color: white;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
  animation: tooltip-float 2s ease-in-out infinite alternate;
  transition: opacity 0.5s ease;
}

.ai-chat-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: rgba(99, 102, 241, 0.95);
  transform: rotate(45deg);
  border-radius: 2px;
}

.ai-chat-tooltip.fade-out {
  opacity: 0;
  pointer-events: none;
}

@keyframes tooltip-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

.ai-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 520px;
  min-width: 320px;
  min-height: 400px;
  max-width: 600px;
  max-height: 80vh;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  transform-origin: bottom right;
  resize: both;
  direction: ltr;
}

.ai-chat-window.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

.ai-chat-header {
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-family: var(--font-heading);
}

.ai-chat-title i {
  color: var(--accent-primary);
}

.ai-chat-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chat-close:hover {
  color: var(--text-primary);
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.ai-chat-messages::-webkit-scrollbar {
  width: 4px;
}

.ai-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.ai-chat-messages .message {
  display: flex;
  max-width: 85%;
}

.ai-chat-messages .message.user {
  align-self: flex-end;
}

.ai-chat-messages .message.assistant {
  align-self: flex-start;
}

.ai-chat-messages .message-content {
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.ai-chat-messages .message.user .message-content {
  background: var(--accent-primary);
  color: white;
  border-bottom-right-radius: 2px;
}

.ai-chat-messages .message.assistant .message-content {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-bottom-left-radius: 2px;
}

.ai-icebreakers {
  padding: 0 20px 15px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icebreaker-btn {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.icebreaker-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: white;
}

.ai-chat-form {
  padding: 15px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 10px;
}

.ai-chat-form input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 10px 15px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.ai-chat-form input:focus {
  border-color: var(--accent-primary);
}

.ai-chat-form button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.ai-chat-form button:hover {
  background: var(--accent-secondary);
}

.ai-chat-form button:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

/* ========================================
   Markdown Rendering in Chat Messages
   ======================================== */
.ai-chat-messages .message.assistant .message-content p {
  margin: 0 0 8px 0;
}

.ai-chat-messages .message.assistant .message-content p:last-child {
  margin-bottom: 0;
}

.ai-chat-messages .message.assistant .message-content h3 {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--accent-primary);
  margin: 10px 0 6px 0;
}

.ai-chat-messages .message.assistant .message-content h4 {
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: #c4b5fd;
  margin: 8px 0 4px 0;
}

.ai-chat-messages .message.assistant .message-content strong {
  font-weight: 700;
  color: #e0e7ff;
}

.ai-chat-messages .message.assistant .message-content em {
  font-style: italic;
  color: var(--text-secondary);
}

.ai-chat-messages .message.assistant .message-content ul,
.ai-chat-messages .message.assistant .message-content ol {
  margin: 6px 0;
  padding-left: 20px;
}

.ai-chat-messages .message.assistant .message-content li {
  margin-bottom: 4px;
  line-height: 1.5;
}

.ai-chat-messages .message.assistant .message-content li::marker {
  color: var(--accent-primary);
}

.ai-chat-messages .message.assistant .message-content a {
  color: #a5b4fc;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.ai-chat-messages .message.assistant .message-content a:hover {
  color: #c4b5fd;
}

.ai-chat-messages .message.assistant .message-content code.inline-code {
  background: rgba(99, 102, 241, 0.15);
  color: #c4b5fd;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-family: 'Fira Code', 'Consolas', monospace;
}

.ai-chat-messages .message.assistant .message-content pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
  overflow-x: auto;
}

.ai-chat-messages .message.assistant .message-content pre code {
  font-size: 0.8rem;
  font-family: 'Fira Code', 'Consolas', monospace;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Resize handle indicator for chat window */
.ai-chat-window::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.3) 25%, transparent 25%),
    linear-gradient(225deg,
      rgba(255,255,255,0.3) 25%, transparent 25%),
    linear-gradient(315deg,
      rgba(255,255,255,0.3) 25%, transparent 25%),
    linear-gradient(45deg,
      rgba(255,255,255,0.3) 25%, transparent 25%);
  background-size: 4px 4px;
  background-position: 0 0, 0 2px, 2px -2px, 2px 0;
  opacity: 0.4;
  pointer-events: none;
}
