@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

:root {
  /* Glautech.com Theme Synchronization */

  /* Primary Colors - Matching main site's gradient vibes */
  --primary: #8b5cf6;
  /* Violet 500 */
  --primary-hover: #7c3aed;
  /* Violet 600 */
  /* Accent Colors for Buttons */
  --accent: #8b5cf6;
  --accent2: #06b6d4;
  --gradient-primary: linear-gradient(135deg, #8b5cf6, #d946ef, #06b6d4);
  /* Violet -> Fuchsia -> Cyan */

  /* Background - Exact Copy from Glautech.com */
  --bg-gradient:
    radial-gradient(1000px 600px at 10% 20%, rgba(124, 58, 237, 0.12), rgba(0, 0, 0, 0)),
    radial-gradient(900px 500px at 90% 80%, rgba(6, 182, 212, 0.08), rgba(0, 0, 0, 0)),
    linear-gradient(rgb(15, 23, 42), rgb(11, 16, 32));

  --bg-color: #0f172a;
  /* Fallback */

  /* Text Colors */
  --text-main: #e6eef8;
  /* Off-white from main site */
  --text-muted: #94a3b8;
  /* Slate 400 */

  /* Component Colors */
  --card-bg: rgba(30, 41, 59, 0.6);
  /* Translucent Slate 800 */
  --card-border: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.1);
  --info-bg: rgba(59, 130, 246, 0.1);
  --info-border: rgba(59, 130, 246, 0.2);
  --error-color: #fb7185;
  /* Rose 400 - Matches theme vibe */
  --secondary: #64748b;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);

  --radius: 1rem;
  --shadow-glow: 0 0 15px rgba(139, 92, 246, 0.3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Reusing dark mode styles as default, but keeping class for specific overrides if needed */
html.light-mode {
  --text-main: #1e293b;
  --bg-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 50%, #fae8ff 100%);
  --card-bg: rgba(255, 255, 255, 0.8);
  --border-color: #e2e8f0;
}

/* Tabs */
.tabs-container {
  display: flex;
  align-items: center;
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.25rem 0.5rem;
  box-shadow: var(--shadow-sm);
  z-index: 10;
  position: sticky;
  top: 0;
}

.tabs {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 0.5rem 0;
  flex: 1;
  min-width: 0;
  /* Prevent flex overflow */
}

.tabs::-webkit-scrollbar {
  display: block;
  height: 3px;
}

.tabs::-webkit-scrollbar-track {
  background: transparent;
}

.tabs::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

.tabs a.tablink {
  display: inline-block;
  padding: 0.6rem 1rem;
  text-decoration: none;
  color: var(--text-muted);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tabs a.tablink:hover {
  background: var(--bg);
  color: var(--primary);
}

.tabs a.tablink.active {
  background: var(--info-bg);
  color: var(--primary);
  font-weight: 600;
}

.tabs-scroll-indicator {
  display: none;
}

/* Tab toggle buttons (Dark mode / icons) */
#toggle-theme,
.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  margin-right: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

#toggle-theme:hover,
.nav-icon-btn:hover {
  background: transparent;
  color: var(--primary);
  border: none;
  transform: translateY(-1px);
}

#toggle-theme img,
.nav-icon-btn img {
  filter: grayscale(100%);
  opacity: 0.7;
  transition: 0.2s;
}

#toggle-theme:hover img,
.nav-icon-btn:hover img {
  filter: none;
  opacity: 1;
}

.nav-icon-btn.active {
  background: transparent;
  border: none;
}

.nav-icon-btn.active img {
  filter: none;
  opacity: 1;
}

/* Kartlar */
/* Layout & Cards */
.container {
  max-width: 650px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Card Glassmorphism */
.card {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin: 2rem auto;
  border: 1px solid var(--card-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.youtube-icon {
  position: absolute;
  top: 0;
  right: 0;
  background: #cc0000;
  color: white;
  width: 80px;
  height: 80px;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  display: flex;
  justify-content: flex-end;
  padding: 12px 12px 0 0;
  text-decoration: none;
  font-size: 1.6rem;
  z-index: 10;
  transition: all 0.2s ease;
}

.youtube-icon i {
  transform: rotate(0);
}

.youtube-icon:hover {
  background: #ff0000;
  width: 90px;
  height: 90px;
  padding: 14px 14px 0 0;
  box-shadow: none;
  /* Shadow doesn't work well with clip-path on the element itself, would need filter: drop-shadow */
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
  color: white;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}



/* Page Content - no longer hidden by default since separate pages */
.tab-content {
  display: block;
  padding-top: 1rem;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

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

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  text-align: center;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

input {
  width: 100%;
  max-width: none;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Sonuç kutuları */
/* Result Boxes */
.result-box {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-left: 4px solid var(--primary);
  padding: 1rem;
  margin-top: 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.3s ease;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Butonlar */
/* Gradient Buttons */
button.copy-btn,
.video-btn,
.calc-btn {
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  border: none;
  border-radius: calc(var(--radius) * 2);
  /* Pill shape */
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: 0.02em;
}

button.copy-btn:hover,
.video-btn:hover,
.calc-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-glow);
}

button.copy-btn:active,
.video-btn:active,
.calc-btn:active {
  transform: translateY(0);
}

/* Video kutusu */
.video-container {
  height: 0;
  opacity: 0;
  overflow: hidden;
  transition: height 0.5s ease, opacity 0.5s ease;
  margin-top: 15px;
  text-align: center;
}

.video-container.show {
  height: 315px;
  opacity: 1;
}

/* Info & sponsor */
/* Info & sponsor */
.info-box {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-left: 3px solid var(--primary);
  padding: 0.875rem 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 400;
  text-align: left;
  color: var(--text-muted);
  line-height: 1.5;
}

.info-box:first-of-type {
  margin-top: 0;
}

/* Safe Range Box - Orange Warning Theme */
.safe-range-box {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.15), rgba(251, 191, 36, 0.15));
  border: 1px solid rgba(251, 146, 60, 0.3);
  border-left: 4px solid #fb923c;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(251, 146, 60, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

html.light-mode .safe-range-box {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.1), rgba(251, 191, 36, 0.08));
  border-color: rgba(251, 146, 60, 0.4);
  box-shadow: 0 2px 8px rgba(251, 146, 60, 0.15);
  color: #9c5800;
}

/* Sponsor */
.sponsor-box {
  background: transparent;
  padding: 0.5rem;
  margin: 1rem auto;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Mail Container */
.container.mail {
  margin: 6px auto;
  margin-bottom: 2rem;
  /* daha sıkı hizalama */
  font-size: 14px;
  text-align: center;
  color: var(--text-muted);
}

.container.mail a {
  text-decoration: none;
  color: inherit;
}

/* Dark mode uyumu */
/* Dark mode overrides removed - using variables */

/* Toast */
#toast {
  visibility: hidden;
  min-width: 220px;
  min-width: 220px;
  background-image: var(--gradient-primary);
  box-shadow: var(--shadow-glow);
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 12px;
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.5s, bottom 0.5s;
}

/* Mobil uyumluluk */
/* Mobil uyumluluk */
@media (max-width: 600px) {
  .container {
    margin: 1rem auto;
    padding: 0 1rem;
  }

  .card {
    padding: 1.25rem !important;
    margin-bottom: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  h3 {
    font-size: 1rem;
  }

  input {
    width: 100%;
    font-size: 16px;
    /* Stop iOS zoom */
  }

  /* Result box adjustments */
  .result-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .result-actions {
    flex-direction: column;
    margin-top: 1rem;
  }

  /* Nav icon fix for mobile */
  #toggle-theme,
  .nav-icon-btn {
    border-color: transparent;
    background: transparent;
  }

  #toggle-theme:hover,
  .nav-icon-btn:hover {
    background: transparent;
    border-color: transparent;
  }
}

/* Dark mode toggle */
#toggle-theme {
  width: auto;
  height: auto;
  padding: 10 5px;
  font-size: 15px;
  background: transparent;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

#toggle-theme:hover {
  transform: scale(1.2);
}

/* Filament specific styles */

.filament-info {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.filament-search {
  width: 100%;
  margin-bottom: 1rem;
}

.filament-list {
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.filament-list::-webkit-scrollbar {
  width: 6px;
}

.filament-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.filament-list::-webkit-scrollbar-track {
  background: transparent;
}

.filament-item {
  display: flex;
  flex-direction: column;
  background: rgba(30, 41, 59, 0.6);
  /* Default Dark */
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  transition: all 0.2s ease;
}

html.light-mode .filament-item {
  background: rgba(255, 255, 255, 0.5);
  /* Light Mode Override */
  border-color: #e2e8f0;
}

.filament-item:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

html.light-mode .filament-item:hover {
  background: var(--info-bg);
}

.filament-details h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.spool-badges {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  background: var(--secondary);
  color: white;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  /* Pill shape */
  font-size: 0.85rem;
  transition: transform 0.2s;
}

.badge:hover {
  transform: scale(1.05);
}

/* Makara türü renkleri */
.badge.plastic {
  background: #1f2937;
  /* Dark gray */
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.badge.cardboard {
  background: #d97706;
  /* Amber 600 */
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tolerance {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-weight: normal;
}

.brand-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: normal;
  font-style: italic;
}

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

  100% {
    transform: rotate(360deg);
  }
}

#filament-icon {
  animation: spin 4s linear infinite;
}

/* Filament Legend */
.filament-legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Dark Mode Overrides Removed - Now Default */

/* Utility to hide/show */
.hidden {
  display: none !important;
}

/* Remove arrows from number inputs */

/* Remove arrows from number inputs */
input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
  /* Firefox */
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}