/* Base styles */
:root {
  --dark-bg: #1a1a1a;
  --dark-hover: #2a2a2a;
  --text-light: #ffffff;
  --border-radius: 8px;
}

/* Header and Navigation styles */
.app-header {
  background: #000000;
  width: 100vw;
  padding: 0.5rem 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  left: 0;
  overflow: visible;
}

.header-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: visible;
}

.logo-link {
  display: block;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo-link:hover {
  transform: translateY(-2px);
}

.calculator-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-container {
  position: relative;
  height: 50px;
  width: 50px;
  margin-right: 8px;
}

.logo-letter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  font-weight: 900;
  color: white;
  z-index: 1;
  line-height: 1;
}

.logo-symbols {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  font-size: 14px;
  font-weight: 700;
}

.symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: relative;
  height: 100%;
  width: 100%;
}

.plus {
  grid-column: 2;
  grid-row: 1;
  align-items: flex-start;
  justify-content: flex-end;
  color: #ffeb3b;
  padding-right: 2px;
  text-align: right;
}

.minus {
  grid-column: 2;
  grid-row: 2;
  align-items: flex-end;
  justify-content: flex-end;
  color: #4caf50;
  padding-right: 2px;
  text-align: right;
}

.multiply {
  grid-column: 1;
  grid-row: 1;
  align-items: flex-start;
  justify-content: flex-start;
  color: #f44336;
  padding-left: 2px;
  text-align: left;
}

.divide {
  grid-column: 1;
  grid-row: 2;
  align-items: flex-end;
  justify-content: flex-start;
  color: #2196f3;
  padding-left: 2px;
  text-align: left;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  color: white;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.logo-subtitle {
  color: #ff6b6b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
  margin-left: auto;
  padding: 0;
  list-style: none;
  overflow: visible;
}

.nav-links li {
  position: relative;
}

.nav-links .dropdown {
  position: relative;
  display: inline-block;
}

.nav-links .dropdown-toggle {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 500;
  gap: 0.5rem;
  overflow: visible;
  padding: 0.6rem 1.2rem;
  position: relative;
  text-align: left;
  transition: all 0.2s ease;
  width: auto;
}

.nav-links .dropdown-toggle:hover {
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(255, 107, 107, 0.6);
  transform: translateY(-2px);
}

.nav-links .dropdown-toggle::before {
  color: rgba(255, 235, 59, 0.3);
  content: "+";
  font-size: 10px;
  pointer-events: none;
  position: absolute;
  right: 5px;
  top: 2px;
}

.nav-links .dropdown-toggle::after {
  color: rgba(244, 67, 54, 0.3);
  content: "×";
  font-size: 10px;
  pointer-events: none;
  position: absolute;
  bottom: 2px;
  left: 5px;
}

.dropdown-icon {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.nav-links .dropdown.open .dropdown-icon {
  transform: rotate(180deg);
}

/* Dropdown menu styles - simplified like the previous deployment */
.nav-links .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #1E1E1E;
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 107, 107, 0.2);
  min-width: 220px;
  margin-top: 0.5rem;
  padding: 0.5rem;
  z-index: 1000;
  animation: fadeInDown 0.3s ease;
  transform-origin: top center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links .dropdown.open .dropdown-menu {
  display: block;
}

.nav-links .dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 20px;
  width: 16px;
  height: 16px;
  background-color: #1E1E1E;
  transform: rotate(45deg);
  border-radius: 2px;
  z-index: -1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links .dropdown-menu a {
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  text-align: left;
  border-radius: 4px;
  width: 100%;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  padding-left: 2.2rem;
  box-sizing: border-box;
}

.nav-links .dropdown-menu a:hover {
  background-color: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
}

.nav-links .dropdown-menu a:before {
  content: '';
  position: absolute;
  left: 1rem;
  font-weight: bold;
}

.nav-links .dropdown-menu a:nth-child(1):before {
  content: '+';
  color: #FFEB3B;
}

.nav-links .dropdown-menu a:nth-child(2):before {
  content: '-';
  color: #4CAF50;
}

.nav-links .dropdown-menu a:nth-child(3):before {
  content: '×';
  color: #F44336;
}

.nav-links .dropdown-menu a:nth-child(4):before {
  content: '÷';
  color: #2196F3;
}

.nav-links .dropdown-menu a:nth-child(5):before {
  content: '√';
  color: #9C27B0;
}

.nav-links .dropdown-menu a:nth-child(6):before {
  content: 'f';
  color: #FF9800;
}

/* Main title and content styles */
.main-title {
  font-size: 2.5rem;
  color: #ff6b6b;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  margin: 2rem 0 1.5rem 0;
  text-align: center;
  padding: 0 1rem;
  position: relative;
  display: inline-block;
  animation: rainbow 8s infinite;
}

.main-title::before {
  content: '+';
  position: absolute;
  top: -15px;
  right: -15px;
  color: #FFEB3B;
  font-size: 1.5rem;
  font-weight: bold;
}

.main-title::after {
  content: '×';
  position: absolute;
  bottom: -10px;
  left: -15px;
  color: #F44336;
  font-size: 1.5rem;
  font-weight: bold;
}

main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 1200px;
  padding: 0 20px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
  min-height: 600px;
}

.calculator-section, .features-section, .guides-section {
  margin-bottom: 2rem;
  text-align: center;
}

.calculator-section h2, .features-section h2, .guides-section h2 {
  color: #333;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.calculator-section p, .features-section p, .guides-section p {
  color: #666;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 107, 107, 0.2);
  border-top-color: #ff6b6b;
  border-radius: 50%;
  animation: spinner 1s ease-in-out infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rainbow {
  0% { color: #ff6b6b; }
  20% { color: #ff922b; }
  40% { color: #ffd43b; }
  60% { color: #69db7c; }
  80% { color: #4dabf7; }
  100% { color: #ff6b6b; }
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Function links panel (floating tooltip) */
.function-links {
  position: fixed;
  bottom: 70px;
  right: 15px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-width: 230px;
  font-family: var(--font-family-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif);
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  box-sizing: border-box;
}

.function-links.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.function-links h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 15px;
  color: #333;
  text-align: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
}

.function-links ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.function-links li {
  margin-bottom: 5px;
}

.function-links a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #444;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 4px 6px;
  border-radius: 4px;
}

.function-links a:hover {
  background-color: #f5f5f5;
  color: #ff6b6b;
  transform: translateX(2px);
}

.function-links .icon {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  display: inline-flex;
}

.toggle-links {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 46px;
  height: 46px;
  background-color: #ff6b6b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  border: none;
  transition: all 0.2s ease;
}

.toggle-links:hover {
  background-color: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.toggle-links:active {
  transform: translateY(0);
}

.toggle-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .function-links {
    max-width: 200px;
  }
  
  .toggle-links {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .function-links {
    max-width: 180px;
    right: 10px;
    bottom: 60px;
  }
  
  .function-links a {
    font-size: 12px;
  }
  
  .toggle-links {
    width: 40px;
    height: 40px;
    right: 15px;
    bottom: 15px;
  }
  
  .toggle-icon {
    width: 20px;
    height: 20px;
  }
}

/* Existing styles remain below */
/* ... rest of your static-styles.css content ... */