/* Shared styles for all pages */
:root{
  --dark-bg: #1a1625;
  --darker-bg: #0f0b16;
  --card-bg: #241d35;
  --purple: #a855f7;
  --purple-hover: #9333ea;
  --purple-light: #c084fc;
  --text: #f0e9ff;
  --text-muted: #9ca3af;
  --border: rgba(168, 85, 247, .15);
}

/* Custom Scrollbar Styling - Global */
* {
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.5) rgba(0, 0, 0, 0.2);
}

/* Webkit browsers (Chrome, Safari, Edge) */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.6), rgba(192, 132, 252, 0.5));
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.8), rgba(192, 132, 252, 0.7));
  border-color: rgba(168, 85, 247, 0.3);
}

*::-webkit-scrollbar-thumb:active {
  background: linear-gradient(135deg, #a855f7, #c084fc);
}

/* Scrollbar corner */
*::-webkit-scrollbar-corner {
  background: rgba(0, 0, 0, 0.2);
}

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

html {
  scroll-behavior: smooth;
  background: #000;
  overscroll-behavior-y: none;
}

body {
  margin: 0 auto;
  font-family: 'Inter', sans-serif;
  background: #000 url('../images/HomeBackRound.png') no-repeat center top;
  background-size: 1440px auto;
  background-attachment: scroll;
  color: var(--text);
  position: relative;
  overflow-x: auto;
  overscroll-behavior-y: none;
  width: 1440px;
  max-width: 1440px;
  min-height: 100vh;
}

/* Navigation Styles */
/* Hide old dynamically loaded navbar */
#navbar-container nav {
  display: none !important;
}

/* Always show navbar-2-0 */
#navbar-2-0 {
  display: flex !important;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 60px;
  position: relative;
  z-index: 100;
  max-width: 1800px;
  margin: 0 auto;
}

.logo-section {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
}

.logo-section img {
  height: 150px;
  width: auto;
  object-fit: contain;
  margin-top: 0px;
  margin-left: 0px;
}

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color .3s;
}

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

.nav-buttons {
  display: flex;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
  align-items: center;
}

/* Settings Dropdown */
.settings-container {
  position: relative;
}

.btn-settings {
  padding: 8px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 32px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-settings:hover {
  color: var(--purple-light);
  transform: scale(1.1);
}

.btn-settings.active {
  color: var(--purple-light);
}

.settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: linear-gradient(135deg, #241d35, #1d1530);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 1000;
  animation: slideDown 0.2s ease;
}

.settings-dropdown.active {
  display: block;
}

.settings-section {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.settings-section:last-child {
  border-bottom: none;
}

.settings-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--purple-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}

.settings-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: transparent;
  border-radius: 8px;
  margin-bottom: 8px;
}

.settings-user-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.settings-user-details {
  flex: 1;
}

.settings-username {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.settings-role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.settings-role.admin {
  background: linear-gradient(135deg, #a855f7, #c084fc);
  color: white;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.settings-role.free {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.2), rgba(107, 114, 128, 0.1));
  color: #9CA3AF;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.settings-role.starter {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.settings-role.scaling {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(139, 92, 246, 0.15));
  color: #C084FC;
  border: 1px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3);
}

.settings-role.business {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.15));
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.2);
}

.quick-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quick-link {
  display: block;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  background: transparent;
}

.quick-link:hover {
  background: rgba(168, 85, 247, 0.1);
  color: var(--purple-light);
  transform: translateX(4px);
}

.settings-currency-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.settings-dropdown .currency-select {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
}

.settings-dropdown .btn-save-currency {
  display: inline-block;
  padding: 8px 12px;
  font-size: 11px;
}

/* Button Styles */
.btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all .3s;
  cursor: pointer;
  border: none;
  font-size: 15px;
}

.btn-ghost {
  background: rgba(168, 85, 247, .08);
  border: 1px solid rgba(168, 85, 247, .2);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(168, 85, 247, .15);
  border-color: rgba(168, 85, 247, .3);
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--purple-hover), var(--purple));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(168, 85, 247, .4);
}

.btn-large {
  padding: 16px 36px;
  font-size: 16px;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: rgba(168, 85, 247, .1);
  border-color: var(--purple);
}

/* Calculator Buttons */
.btn-calc {
  padding: 12px 24px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-calc:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-calc:active {
  transform: translateY(0);
}

.btn-calc:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-calc::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-calc:hover::before {
  width: 300px;
  height: 300px;
}

.btn-calc-ghost {
  padding: 12px 24px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-calc-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
}

/* Modal Styles - Kindle3D Inspired Design */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: none;
  z-index: 200;
}

#modal, #signupModal, #verificationModal, #resetPasswordModal, #printerModal, #filamentModal, #savePresetModal, #managePresetsModal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10000;
  place-items: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: 480px;
  max-width: 90vw;
  background: #0a0a0a !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-card > * {
  width: 100%;
}

/* Wider modal for forms with more content */
.modal-card.modal-wide {
  width: 900px;
  max-width: 90vw;
}

.modal-card.modal-wide > * {
  max-width: 800px;
}

/* Two-column layout for modals */
.modal-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  width: 100%;
  max-width: 1000px;
}

.modal-column {
  display: flex;
  flex-direction: column;
}

/* Modal close button */
.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Modal Logo */
.modal-logo {
  width: 100px;
  height: auto;
  margin-bottom: 24px;
  display: block;
}

.modal-card h3 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.modal-card .modal-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Social Login Buttons */
.social-login-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.social-login-btn {
  width: 100%;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: 'Inter', sans-serif;
}

.social-login-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.social-login-btn svg,
.social-login-btn img {
  width: 20px;
  height: 20px;
}

/* Divider */
.modal-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-divider::before {
  margin-right: 12px;
}

.modal-divider::after {
  margin-left: 12px;
}

/* Modal hint text */
.modal-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 10px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.modal-format-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 10px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.modal-card label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 8px;
  margin-top: 14px;
}

.modal-card label:first-of-type {
  margin-top: 0;
}

.modal-input-wrapper {
  position: relative;
}

.modal-card input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #ffffff;
  font-size: 15px;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}

.modal-card input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.modal-card input:focus {
  outline: none;
  border-color: #6445F5;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(100, 69, 245, 0.1);
}

.modal-card textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  transition: all 0.2s ease;
  font-family: 'Courier New', monospace;
  box-sizing: border-box;
  resize: vertical;
  min-height: 100px;
}

.modal-card textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.modal-card textarea:focus {
  outline: none;
  border-color: #6445F5;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(100, 69, 245, 0.1);
}

/* Password toggle button */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s ease;
  font-size: 18px;
}

.password-toggle:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* Forgot password link */
.forgot-password-link {
  display: block;
  text-align: right;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  margin-top: 6px;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: #ffffff;
}

.err {
  color: #ff6b6b;
  font-size: 11px;
  margin: 8px 0;
  min-height: 14px;
  background: rgba(255, 107, 107, 0.1);
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid #ff6b6b;
}

.success {
  color: #51cf66;
  font-size: 11px;
  margin: 8px 0;
  min-height: 14px;
  background: rgba(81, 207, 102, 0.1);
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid #51cf66;
}

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.modal-buttons .btn {
  width: 100%;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: 'Inter', sans-serif;
}

.modal-buttons .btn-primary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.modal-buttons .btn-primary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  box-shadow: none;
}

.modal-buttons .btn-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-buttons .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

/* Sign up / Login switch */
.modal-footer-text {
  text-align: center;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.modal-footer-text a {
  color: #6445F5;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.modal-footer-text a:hover {
  color: #7d5ff7;
}

/* Code Input for Verification */
.code-inputs-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}

.code-input {
  width: 50px;
  height: 60px;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #ffffff;
  transition: all 0.2s ease;
}

.code-input:focus {
  outline: none;
  border-color: #6445F5;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(100, 69, 245, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  nav {
    padding: 20px 24px;
  }
  
  .nav-links {
    display: none;
  }
  
  .logo-section img {
    height: 80px;
  }
}
