/* ============================================================
   Interactive Globe Tool - Standalone Styles
   Fully isolated from main website
   ============================================================ */

:root {
  --primary: #00e556;
  --primary-dim: rgba(0, 229, 86, 0.1);
  --bg-main: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-surface: #ffffff;
  --text-main: #0b0b0b;
  --text-muted: #4b5563;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

html.dark {
  --bg-main: #030303;
  --bg-secondary: #0a0a0a;
  --bg-surface: #0f0f0f;
  --text-main: #ffffff;
  --text-muted: #a0a0a0;
  --border-color: #262626;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* Header */
.tool-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.88);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

html.dark .tool-header {
  background: rgba(3, 3, 3, 0.8);
}

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

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.125rem;
}

.logo-text { font-family: 'Space Grotesk', sans-serif; }

.logo-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  background: var(--primary-dim);
  color: var(--primary);
  border-radius: 4px;
  font-weight: 600;
}

.header-nav { display: flex; align-items: center; gap: 8px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover { color: var(--primary); background: var(--primary-dim); }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.theme-toggle:hover { color: var(--primary); background: var(--primary-dim); }

.theme-icon-dark { display: none; }
html.dark .theme-icon-light { display: none; }
html.dark .theme-icon-dark { display: inline; }

/* Main - full-viewport globe first (Language Explorer style) */
.tool-main { flex: 1; }

/* Globe section: fills viewport below header */
.globe-section {
  position: relative;
  width: 100%;
  height: calc(100vh - 60px);
  min-height: 400px;
  background: #030303;
}

.globe-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #030303;
}

.globe-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #030303;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.globe-loading .material-icons-outlined { font-size: 48px; opacity: 0.7; }

.spin {
  animation: spin 1.5s linear infinite;
}

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

.globe-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.globe-canvas:active { cursor: grabbing; }

/* Navigation buttons on the left (like Google Language Explorer) */
.globe-controls {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
  pointer-events: auto;
}

.globe-control-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  backdrop-filter: blur(10px);
}

.globe-control-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.globe-control-btn .material-icons-outlined {
  font-size: 24px;
}

/* Overlay text on globe (like Google Language Explorer) */
.globe-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 32px 48px;
  background: linear-gradient(to top, rgba(3, 3, 3, 0.85) 0%, transparent 45%);
  z-index: 1;
}

.globe-overlay a { pointer-events: auto; }

.breadcrumb-overlay {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
}

.breadcrumb-overlay a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}
.breadcrumb-overlay a:hover { color: var(--primary); }

.globe-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.globe-tagline {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 520px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.globe-tagline a {
  color: var(--primary);
  text-decoration: none;
}
.globe-tagline a:hover { text-decoration: underline; }

.globe-hint-overlay {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* About section below the fold */
.about-section {
  padding: 48px 0 32px;
  background: var(--bg-main);
}

body:not(.dark) .about-section { background: #f5f5f5; }
html.dark .about-section { background: #0a0a0a; }

.info-card {
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.info-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.info-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

.info-card p:last-of-type { margin-bottom: 0; }

.back-link { color: var(--primary); text-decoration: none; }
.back-link:hover { text-decoration: underline; }
html.dark .back-link { color: var(--primary); }

/* Footer */
.tool-footer {
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  background: var(--bg-surface);
}

.footer-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-link { color: var(--text-muted); text-decoration: none; }
.footer-link:hover { color: var(--primary); }
