@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");
@import url("./Header/style.css");
@import url("./Footer/style.css");
@import url("./Bottom-nav/style.css");
@import url("./Index/style.css");
@import url("./Error/style.css");
@import url("./ErrorHandler/style.css");
@import url("./theme-switcher/style.css");

/*
  Standard Breakpoints (for @media queries):
  -xs: 480px   (Small mobile)
  -sm: 600px   (Mobile)
  -md: 768px   (Tablet)
  -lg: 1024px  (Desktop)
  --xl: 1280px  (Large screen)
*/

:root {
  /* Primary Brand Colors */
  --color-primary: #0093c1;
  --color-primary-dark: #0495c2;
  --color-primary-hover: #007ba3;
  --color-primary-deep: #014865;
  --color-primary-light: #84B9CE;

  /* Text Colors - Light Theme */
  --color-text-primary-light: #0c0e1f;
  --color-text-secondary-light: #494a57;
  --color-text-muted-light: #666;
  --color-text-white: #ffffff;

  /* Text Colors - Dark Theme */
  --color-text-primary-dark: #f0f0f0;
  --color-text-secondary-dark: #e1e1e1;
  --color-text-muted-dark: #969696;

  /* Background Colors - Light Theme */
  --color-bg-primary-light: #ffffff;
  --color-bg-secondary-light: #f8f9fb;
  --color-bg-tertiary-light: #f4fbff;
  --color-bg-quaternary-light: #eef0f0;

  /* Background Colors - Dark Theme */
  --color-bg-primary-dark: #181d26;
  --color-bg-secondary-dark: #222935;
  --color-bg-tertiary-dark: #2d3747;
  --color-bg-quaternary-dark: #2a2f3a;

  /* Border Colors - Light Theme */
  --color-border-primary-light: #d9dbdc;
  --color-border-secondary-light: #e0e0e0;

  /* Border Colors - Dark Theme */
  --color-border-primary-dark: #3a465a;
  --color-border-secondary-dark: #303a4a;

  /* Shadow Colors */
  --color-shadow-light: rgba(0, 0, 0, 0.1);
  --color-shadow-medium: rgba(0, 0, 0, 0.3);
  --color-shadow-card-light: rgba(2, 4, 22, 0.078);
  --color-shadow-card-dark: rgba(0, 0, 0, 0.3);

  /* Special Colors */
  --color-success: #00b2a8;
  --color-error: #ff5252;
  --color-warning: #ffc107;
  --color-info: #00a59b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: #0c0e1f;
  font-weight: inherit;
}

body {
  font-family: "Noto Sans TC", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 72px;
  background-color: #ffffff;
  transition: background-color 0.3s ease;
  overflow-x: hidden;
}

[data-theme="dark"] body {
  background-color: #0f1217;
}

.content {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
}

@media (max-width: 1024px) {
  body {
    padding-top: 64px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 64px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 55px;
  }
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.floating-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.floating-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.floating-btn.show {
  display: flex !important;
}

.scroll-to-top {
  background-color: #b4aeb1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.scroll-to-top:hover {
  background-color: #888285;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .scroll-to-top {
  background-color: #686868;
}

[data-theme="dark"] .scroll-to-top:hover {
  background-color: #555555;
}

.floating-customer-service {
  width: 56px;
  height: 56px;
  background-color: #232534e5;
  color: white;
  box-shadow: 0px 4px 24px 0px #02041614, 0px 2px 16px -8px #02041633;
  transition: all 0.3s ease;
}

.floating-customer-service:hover {
  background-color: #292c36;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0px 6px 28px 0px #02041620, 0px 4px 20px -8px #02041640;
}

[data-theme="dark"] .floating-customer-service {
  background-color: #0495c2e5;
}

[data-theme="dark"] .floating-customer-service:hover {
  background-color: #0495c2;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0px 6px 28px 0px #0495c220, 0px 4px 20px -8px #0495c240;
}

@media (max-width: 768px) {
  .floating-buttons {
    bottom: 7rem;
    right: 16px;
  }
}

/* Loading Component Styles */
#app-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-container {
  width: 80px;
  height: 80px;
  background: rgba(19, 15, 15, 0.78);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid #ffffff;
  border-top: 2px solid #cccccc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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