:root {
  --primary: #FF6B00;
  --primary-light: #FF8C38;
  --primary-lighter: #FFB366;
  --primary-bg: #FFF3E6;
  --accent: #E65100;
  --dark: #1a1a2e;
  --dark-2: #16213e;
  --white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Poppins', sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #ffffff 0%, #fff5ed 50%, #ffe6cc 150%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  color: var(--dark);
}

.background-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 107, 0, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.8;
  z-index: 0;
  pointer-events: none;
}

#particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto; /* Let particles respond to mouse */
}

.gear-button {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  text-decoration: none;
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.15);
}

.gear-button:hover {
  background: var(--primary);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 15px var(--primary-light);
}

.landing-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 0;
  pointer-events: none;
}

#logo-button, .title-section, .motto-bar, .gear-button, .close-menu, .menu-item, .popup-close, #announcement-popup {
  pointer-events: auto;
}

.title-section {
  position: absolute;
  top: 12%;
  left: 0;
  width: 100%;
  text-align: center;
  animation: fadeInDown 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  z-index: 5;
}

.title-section h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark);
  text-shadow: 0 2px 10px rgba(255, 107, 0, 0.15);
}

.highlight {
  display: inline-block;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: var(--white);
  padding: 0 15px;
  border-radius: 8px;
  position: relative;
  animation: glowPulse 2s infinite alternate;
}

.title-section h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--dark-2);
  margin-bottom: 0.5rem;
}

.title-section h3 {
  font-size: 1.1rem;
  font-weight: 300;
  color: #555;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
  animation: fadeInUp 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) 0.3s forwards;
  opacity: 0;
  z-index: 10;
}

#logo-button {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.4s ease;
}

#logo-button:hover {
  transform: scale(1.05);
}

.logo-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px dashed var(--primary-light);
  animation: rotate 15s linear infinite;
  opacity: 0.8;
  box-shadow: 0 0 20px rgba(255, 107, 0, 0.3);
}

#logo-button:hover .logo-ring {
  border-color: var(--primary);
  animation-duration: 5s;
  box-shadow: 0 0 30px var(--primary);
}

#logo-button img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--white);
  padding: 10px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
  animation: pulse 3s infinite;
}

.motto-bar {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 107, 0, 0.2);
  padding: 15px 40px;
  border-radius: 30px;
  font-style: italic;
  font-weight: 500;
  color: var(--dark);
  letter-spacing: 1px;
  box-shadow: 0 8px 32px rgba(255, 107, 0, 0.1);
  animation: slideUp 1s ease 0.6s forwards;
  opacity: 0;
  transform: translate(-50%, 50px);
  white-space: nowrap;
}

/* Menu Overlay */
#menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Hide elements when menu is open */
body.menu-open .title-section,
body.menu-open .motto-bar,
body.menu-open .gear-button,
body.menu-open #announcement-popup {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.5s ease;
}

.title-section, .motto-bar, .gear-button, #announcement-popup {
  transition: opacity 0.5s ease;
}

.close-menu {
  position: absolute;
  top: 30px;
  right: 30px;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
}

.close-menu:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

.menu-orbital {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.center-logo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--white);
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(255, 107, 0, 0.4);
  z-index: 10;
}

.center-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.menu-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-item.animate-in {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.menu-item:hover {
  transform: translate(-50%, -50%) scale(1.15) !important;
  z-index: 20;
}

.menu-circle {
  width: 90px;
  height: 90px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  margin-bottom: 12px;
  border: 3px solid transparent;
  transition: all 0.3s ease;
}

.menu-item:hover .menu-circle {
  border-color: var(--primary-light);
  box-shadow: 0 0 25px var(--primary);
  color: var(--accent);
}

.menu-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  background: rgba(0,0,0,0.5);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Sub Menu Styles */
.sub-menu-container {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 10px;
  min-width: 180px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
  border: 1px solid var(--primary-lighter);
  pointer-events: none;
}

/* Arrow pointer */
.sub-menu-container::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(255, 255, 255, 0.95);
}

.menu-item.has-sub.open .sub-menu-container {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.sub-menu-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: var(--dark);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-bottom: 5px;
}

.sub-menu-item:last-child {
  margin-bottom: 0;
}

.sub-menu-item:hover {
  background: var(--primary-bg);
  color: var(--primary);
  transform: translateX(5px);
}

.sub-menu-item i, .sub-menu-item img {
  width: 20px;
  margin-right: 10px;
  color: var(--primary);
}

/* Announcement Popup */
#announcement-popup {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 350px;
  max-width: calc(100vw - 40px);
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  z-index: 90;
  overflow: hidden;
  animation: slideInRight 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

#announcement-popup.hiding {
  animation: slideOutRight 0.5s forwards;
}

.popup-header {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  padding: 12px 15px;
  display: flex;
  align-items: center;
  color: var(--white);
  font-weight: 600;
}

.popup-header i:first-child {
  margin-right: 10px;
  font-size: 1.2rem;
}

.popup-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 1.2rem;
}

.popup-content {
  padding: 15px;
  background: var(--white);
  color: var(--dark);
}

.popup-content h4 {
  margin-bottom: 8px;
  color: var(--primary);
}

.popup-content p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #444;
}

/* Animations */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fadeInDown {
  0% { opacity: 0; transform: translateY(-30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  0% { opacity: 0; transform: translate(-50%, 50px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.4); }
  70% { box-shadow: 0 0 0 20px rgba(255, 107, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0); }
}

@keyframes glowPulse {
  from { box-shadow: 0 0 5px var(--primary); }
  to { box-shadow: 0 0 15px var(--primary-light), 0 0 25px var(--primary); }
}

@keyframes slideInRight {
  0% { opacity: 0; transform: translateX(100px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  0% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(120%); }
}

/* Responsive */
@media (max-width: 768px) {
  .title-section h1 { font-size: 2.2rem; }
  .title-section h2 { font-size: 1.2rem; }
  .title-section h3 { font-size: 0.9rem; }
  
  #logo-button { width: 140px; height: 140px; }
  #logo-button img { width: 110px; height: 110px; }
  
  .motto-bar {
    width: 90%;
    padding: 12px 20px;
    font-size: 0.9rem;
    bottom: 20px;
    white-space: normal;
    text-align: center;
  }
  
  /* Reset menu orbital to grid on mobile */
  .menu-orbital {
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 60px;
    overflow-y: auto;
  }
  
  .center-logo {
    margin-bottom: 40px;
    position: relative;
    width: 120px;
    height: 120px;
  }
  
  .menu-item {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    margin-bottom: 25px;
    flex-direction: row;
    width: 250px;
    background: rgba(0,0,0,0.3);
    border-radius: 40px;
    padding: 8px;
    transform: translate(0, 0) scale(0);
  }
  
  .menu-item.animate-in {
    transform: translate(0, 0) scale(1);
  }
  
  .menu-item:hover {
    transform: translate(0, 0) scale(1.05) !important;
  }
  
  .menu-circle {
    width: 60px;
    height: 60px;
    margin-bottom: 0;
    margin-right: 15px;
    font-size: 1.5rem;
  }
  
  .menu-label {
    background: transparent;
    padding: 0;
  }
  
  /* Mobile Submenu Accordion */
  .menu-item.has-sub {
    flex-wrap: wrap;
    height: auto;
  }
  
  .sub-menu-container {
    position: static;
    transform: none !important;
    width: 100%;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    display: none; /* Hide via display for accordion */
  }
  
  .sub-menu-container::before {
    display: none;
  }
  
  .menu-item.has-sub.open .sub-menu-container {
    display: block;
  }
  
  .sub-menu-item {
    color: var(--white);
    background: rgba(0,0,0,0.2);
  }
  
  .sub-menu-item:hover {
    background: rgba(255, 107, 0, 0.3);
    color: var(--white);
  }
}
