:root {
  /* Color Palette - Deep Slate & Cyber Blue */
  --bg-dark: #0a0c10;
  --sidebar-bg: #11141b;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --nav-hover: rgba(59, 130, 246, 0.1);

  --transition-speed: 0.3s;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
}

h1,
h2,
h3,
.logo-text {
  font-family: 'Outfit', sans-serif;
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100vw;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  z-index: 100;
}

.sidebar-header {
  padding: 0 24px 32px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-text span {
  color: var(--accent-blue);
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.nav-section {
  padding: 16px 12px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  transition: all var(--transition-speed);
}

.nav-item:hover {
  background: var(--nav-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg, var(--nav-hover), transparent);
  color: var(--accent-blue);
  border-left: 3px solid var(--accent-blue);
  border-radius: 4px 8px 8px 4px;
}

.nav-icon {
  font-size: 1.2rem;
}

.sidebar-footer {
  padding: 24px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--card-border);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.05), transparent 40%),
    radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.05), transparent 40%);
}

.content-header {
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.content-header h1 {
  font-size: clamp(1.2rem, 5vw, 1.875rem);
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .content-header {
    padding: 20px 16px;
  }
}

.status-badge {
  font-size: 0.75rem;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 100px;
}

.tool-view {
  padding: 0 48px 48px;
  animation: fadeIn 0.4s ease-out;
}

/* UI Elements */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
}

.interactive-card {
  cursor: pointer;
}

.interactive-card h3 {
  color: var(--text-primary);
  margin-bottom: 8px;
}

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

/* Tool Specific Layouts */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.input-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.input-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.input-row .input-group {
  flex: 1;
}

@media (max-width: 580px) {
  .input-row {
    flex-direction: column;
    gap: 20px;
  }
}

.input-group input,
.input-group select {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  width: 100%;
}

/* Toggle Group (dB Mode) */
.toggle-group {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  margin-bottom: 12px;
}

.toggle-btn {
  flex: 1;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: var(--accent-blue);
  color: white;
}

/* Vertical layout for dB mode buttons */
.toggle-group.vertical {
  flex-direction: column;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
}

.toggle-group.vertical .toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 12px;
}

.toggle-group.vertical .toggle-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

/* Styled Inputs with Units */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.styled-input {
  padding-right: 48px !important;
}

.unit-label {
  position: absolute;
  right: 14px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-blue);
  pointer-events: none;
}

/* Divider for Converter */
.swap-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

.swap-icon {
  font-size: 1.25rem;
  color: var(--text-secondary);
  opacity: 0.5;
}

/* Reference List */
.reference-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ref-item {
  display: grid;
  grid-template-columns: 42px 1fr 1.5fr;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
  gap: 8px;
}

.ref-arrow {
  text-align: center;
  opacity: 0.5;
  width: 100%;
}

.ref-item.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--text-primary);
}

.ref-db {
  font-weight: 600;
  width: 60px;
}

.ref-ratio {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--accent-cyan);
  white-space: nowrap;
  text-align: right;
}

.mt-24 {
  margin-top: 24px;
}

/* Formula Card */
.formula-card {
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px 24px;
}

.formula-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 12px;
}

.formula-content {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.05em;
}

.formula-content sub {
  font-size: 0.8rem;
  vertical-align: sub;
  opacity: 0.8;
}

.formula-content strong {
  color: var(--text-primary);
}

/* Fix dropdown option colors for some browsers */
.input-group select option {
  background-color: var(--sidebar-bg);
  color: var(--text-primary);
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--accent-blue);
}

/* Stepper UI */
.stepper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  width: 100%;
  max-width: fit-content;
  overflow: hidden;
  margin-top: 4px;
}

.step-btn {
  background: none;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  flex: 1;
  min-width: 36px;
  height: 44px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
  padding: 0 4px;
}

.step-btn:last-child {
  border-right: none;
}

.step-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.step-btn:active {
  background: var(--accent-blue);
}

.stepper input {
  border: none !important;
  border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: transparent !important;
  border-radius: 0 !important;
  flex: 2;
  min-width: 60px;
  text-align: center;
  padding: 0 !important;
  font-weight: 600;
  color: inherit;
  outline: none !important;
  box-shadow: none !important;
}

/* Hide Spinners */
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stepper input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.mt-8 {
  margin-top: 8px;
}

.result-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.05));
  border-color: rgba(59, 130, 246, 0.2);
}

.result-display {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
}

.result-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.result-value {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.result-value-group {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.result-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0.8;
}

.tool-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.interactive-card {
  cursor: pointer;
  text-align: center;
}

.interactive-card:hover {
  transform: translateY(-5px);
  background: rgba(59, 130, 246, 0.05);
}

.card-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 16px;
}

/* 通例の呼び方 - ハイライト表示 */
.callname-value {
  color: #34d399 !important;
  font-size: 1.6rem !important;
  letter-spacing: 0.05em;
}

/* Reference Image (Stage Height) */
.reference-image-container {
  margin-bottom: 24px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.03);
}

.reference-image {
  width: 100%;
  height: auto;
  display: block;
  max-height: 280px;
  object-fit: contain;
  padding: 12px;
  cursor: zoom-in;
  transition: opacity 0.3s;
}

.reference-image:hover {
  opacity: 0.8;
}

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  padding: 20px;
  cursor: zoom-out;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

.lightbox-content {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease-out;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.image-credit {
  padding: 6px 16px 10px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: right;
}

.image-credit a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.image-credit a:hover {
  text-decoration: underline;
}

/* Stack Visualizer - 2 Point Support */
.visual-container {
  margin-top: 24px;
  background: rgba(0, 0, 0, 0.3);
  padding: 30px 20px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.visual-container h4 {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  width: 100%;
  text-align: center;
}

.stack-visual {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  width: 100%;
  position: relative;
  padding-bottom: 7px;
}

/* Ground/Stage Floor Line */
.stack-visual::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 100%;
  max-width: 300px;
  height: 6px;
  background: #5c3b2e;
  /* Dark wood/stage floor color */
  border-radius: 4px;
}

.support-structure {
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 350px;
  align-items: flex-end;
  z-index: 2;
}

.support-column {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 1.5px;
}

.platform-stack {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 1.5px;
  z-index: 10;
  width: 100%;
}

.part {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.part-platform {
  width: 100%;
  max-width: 220px;
  background: #fef08a;
  /* Bright yellow/wood color like image */
  color: #78350f;
  border-radius: 2px;
}

.part-box {
  width: 44px;
  background: #fde047;
  /* Saturated yellow */
  color: #713f12;
}

.part-leg {
  width: 32px;
  background: #60a5fa;
  /* Modern blue for legs */
  color: white;
}

/* Hinadan Simulator Styles */
.hinadan-visual-container {
  background: rgba(0, 0, 0, 0.3);
  padding: 40px 20px;
  min-height: 350px;
  border-radius: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 1px solid var(--card-border);
  overflow-x: auto;
  margin-top: 20px;
}

.hinadan-visual {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  position: relative;
}

.hinadan-step {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 2px;
  min-width: 80px;
}

.box-part {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #422;
  font-size: 0.6rem;
  font-weight: 800;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.box-face-hira {
  background: #fde047;
  width: 60px;
}

.box-face-yoko {
  background: #fbbf24;
  width: 50px;
}

.box-face-tate {
  background: #d97706;
  width: 40px;
}

.hina-platform {
  width: 90px;
  background: #fef08a;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 1px;
  z-index: 5;
}

.step-label {
  margin-top: 12px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.hinadan-summary {
  background: rgba(255, 255, 255, 0.03);
  padding: 24px;
  border-radius: 12px;
  border-left: 4px solid var(--accent-cyan);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-row strong {
  color: var(--accent-cyan);
}

.config-step-card {
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--card-border);
}

.config-step-card h4 {
  font-size: 0.8rem;
  margin-bottom: 12px;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
}

/* Appearance refinement */
.input-group select {
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 36px !important;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* Responsive & Mobile */

.menu-toggle {
  display: none;
}

.sidebar-overlay {
  display: none;
}

.header-left {
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
  }

  .sidebar-open .sidebar {
    left: 0;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }

  .sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }

  .main-content {
    width: 100vw;
    overflow-y: visible;
  }

  .content-header {
    padding: 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .header-left {
    gap: 16px;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
  }

  .menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
  }

  .sidebar-open .menu-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .sidebar-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .sidebar-open .menu-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .tool-view {
    padding: 0 16px 40px;
  }

  .tool-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Force side-by-side for tool cards */
  .tool-layout.db-layout,
  .tool-layout.stage-layout {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: start;
  }

  .tool-layout.db-layout .input-card,
  .tool-layout.stage-layout .input-card {
    flex: 1;
    min-width: 0;
    /* Allow shrinking below content size */
  }

  .tool-layout.db-layout .result-card,
  .tool-layout.stage-layout .result-card {
    flex: 0 0 auto;
    min-width: 142px;
  }

  .hinadan-visual-container {
    min-width: 280px;
  }

  .card {
    padding: 12px;
  }

  .step-btn {
    min-width: 32px;
    height: 38px;
    font-size: 0.8rem;
  }

  .stepper input {
    min-width: 50px;
    font-size: inherit;
    /* HTML側で指定されたサイズを尊重 */
  }

  .result-value {
    font-size: 1.8rem;
  }

  .reference-image {
    max-height: 200px;
  }

  .visual-container {
    padding: 15px 5px;
  }

  .support-structure {
    max-width: 100%;
  }

  .part-platform {
    max-width: 220px;
  }

  .hinadan-visual-container {
    padding: 15px 5px;
    overflow-x: auto;
  }

  .hinadan-visual {
    gap: 6px;
  }

  .hinadan-step {
    min-width: 60px;
  }

  .box-face-hira {
    width: 50px;
  }

  .box-face-yoko {
    width: 42px;
  }

  .box-face-tate {
    width: 35px;
  }

  .hina-platform {
    width: 65px;
  }
}

/* PWA Update Toast */
.update-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--sidebar-bg);
  border: 1px solid var(--accent-blue);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  padding: 12px 18px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 10000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.update-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.update-toast span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.update-toast button {
  background: var(--accent-blue);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.update-toast button:hover {
  opacity: 0.9;
}

@media (max-width: 580px) {
  .update-toast {
    left: 24px;
    right: 24px;
    bottom: 24px;
    justify-content: space-between;
  }
}

/* Sidebar Actions */
.sidebar-actions {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.share-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.share-btn:hover {
  background: rgba(14, 165, 233, 0.2);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

.share-btn .icon {
  font-size: 1.2rem;
}

/* Share Modal (Glassmorphism) */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 11000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 32px;
  border-radius: 24px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  transform: scale(0.9);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
}

.share-modal h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.share-url-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  word-break: break-all;
  margin-bottom: 24px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.qrcode-container {
  background: white;
  padding: 16px;
  border-radius: 16px;
  display: inline-block;
  margin-bottom: 16px;
}

.qrcode-container img,
.qrcode-container canvas {
  display: block;
}

.modal-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.copy-url-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-url-btn:hover {
  filter: brightness(1.1);
}

.copy-url-btn.success {
  background: #10b981;
}