:root {
  --bg: #fdfdfd; --txt: #111; --sub: #666; --brd: #eeeeee;
  --card: #ffffff; --accent: #2563eb; --btn-bg: #111; --btn-txt: #ffffff;
}

body.dark {
  --bg: #000; --txt: #f5f5f7; --sub: #999; --brd: #1a1a1a;
  --card: #0a0a0a; --btn-bg: #ffffff; --btn-txt: #000000;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
body { 
  font-family: -apple-system, system-ui, sans-serif; 
  background: var(--bg); 
  color: var(--txt); 
  line-height: 1.6; 
  font-display: swap; /* Add this line */
}

header { 
  padding: 15px 25px; display: flex; justify-content: space-between; align-items: center; 
  background: var(--bg); border-bottom: 1px solid var(--brd); position: relative; z-index: 1000; 
}
.logo-text { font-size: 1rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; text-decoration: none; color: inherit; }

#themeBtn { 
  cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  user-select: none; color: var(--txt);
}

main { max-width: 650px; margin: 0 auto; padding: 30px 20px; }

/* TOOL CARD */
.elite-card { 
  background: var(--card); border: 1px solid var(--brd); padding: 45px 25px; border-radius: 28px; 
  box-shadow: 0 10px 40px rgba(0,0,0,0.03); margin-bottom: 40px; text-align: center; 
}

/* PURE STATIC FLOATING BUTTON (NO BOX VERSION) */
#floatBtn {
  position: fixed; 
  bottom: 30px; 
  right: 20px; 
  width: 52px; 
  height: 52px;
  /* BOX REMOVED HERE */
  background: transparent !important; 
  border: none !important;
  
  color: var(--txt); 
  display: flex !important; 
  flex-direction: column !important; 
  align-items: center; 
  justify-content: center;
  cursor: pointer;
  z-index: 2000; 
  transition: opacity 0.3s ease; 
  opacity: 0; 
  visibility: hidden; 
  gap: 2px;
}

#floatBtn span {
  display: block !important;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  /* Added subtle shadow to make text readable over page content */
  text-shadow: 0 0 8px var(--bg); 
}

#floatBtn.show { opacity: 1; visibility: visible; }

/* Increased SVG size slightly for better visibility without a box */
#floatBtn svg { 
  width: 26px; 
  height: 26px; 
  display: block; 
}

article { background: var(--card); border: 1px solid var(--brd); padding: 30px; border-radius: 28px; margin-bottom: 30px; }
article h1 { font-size: 1.8rem; margin-bottom: 15px; font-weight: 900; line-height: 1.3; }
.hero-img { width: 100%; height: auto; border-radius: 20px; margin-bottom: 30px; display: block; }

.toc-title { font-size: 0.7rem; text-transform: uppercase; color: var(--sub); margin-bottom: 12px; letter-spacing: 1.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.toc-title::after { content: ""; height: 1px; background: var(--brd); flex-grow: 1; }
#toc-list { list-style: none; margin-bottom: 35px; }
#toc-list li { margin-bottom: 10px; }
#toc-list a { text-decoration: none; color: var(--accent); font-weight: 700; font-size: 0.95rem; }

article h2 { font-size: 1.4rem; margin: 35px 0 12px; font-weight: 800; scroll-margin-top: 20px; }
article p { color: var(--sub); margin-bottom: 20px; font-size: 1rem; }

/* ADD IT HERE */
article a { 
  word-break: break-all; 
}

.faq-item { border-bottom: 1px solid var(--brd); padding: 20px 0; cursor: pointer; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-weight: 800; display: block; position: relative; padding-right: 30px; font-size: 1rem; }
.faq-q:after { content: '+'; position: absolute; right: 0; top: 0; font-size: 1.5rem; transition: 0.3s; font-weight: 300; line-height: 1; }
.faq-item.active .faq-q:after { transform: rotate(45deg); color: var(--accent); }
.faq-a { color: var(--sub); padding-top: 12px; display: none; font-size: 0.95rem; line-height: 1.7; }
.faq-item.active .faq-a { display: block; }

footer { padding: 40px 20px; text-align: center; border-top: 1px solid var(--brd); margin-top: 40px; }
.f-links { margin-bottom: 20px; display: flex; justify-content: center; gap: 30px; }
.f-links a { text-decoration: none; color: var(--sub); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; }

/* TOOL UI */
.custom-select { position: relative; margin-bottom: 30px; text-align: center; }
.select-selected { 
  background: var(--bg); 
  border: 1px solid var(--brd); 
  padding: 16px; 
  border-radius: 16px; 
  cursor: pointer; 
  font-weight: 700; 
  display: flex; 
  justify-content: center; /* Changed from space-between to center */
  align-items: center; 
}
.select-items div { padding: 16px; cursor: pointer; border-bottom: 1px solid var(--brd); } 
.select-items div:hover { background: var(--brd); }

.qty-display { font-size: 4.5rem; font-weight: 900; line-height: 1; margin-bottom: 5px; text-align: center; }
.qty-label { font-size: 0.65rem; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 35px; text-align: center; color: var(--sub); font-weight: 800; }

input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; margin-bottom: 40px; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; background: var(--brd); border-radius: 10px; }
input[type=range]::-webkit-slider-thumb { height: 28px; width: 28px; border-radius: 50%; background: var(--btn-bg); -webkit-appearance: none; margin-top: -11px; border: 2px solid var(--card); cursor: pointer; }

.copy-btn { width: 100%; padding: 20px; border: none; border-radius: 18px; font-weight: 800; cursor: pointer; background: var(--btn-bg); color: var(--btn-txt); text-transform: uppercase; letter-spacing: 2px; transition: 0.3s; }
.copy-btn.success { background: #0b5627 !important; color: #fff !important; }

/* THE NEW PROFESSIONAL ARROW */
.select-selected::after {
  content: "";
  display: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--txt);
  border-bottom: 2px solid var(--txt);
  transform: rotate(45deg);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0.5;
  margin-top: -5px;
}

.custom-select.active .select-selected::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}

/* THE NEW ANIMATED DROPDOWN */
.select-items {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--brd);
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  border-radius: 16px;
  margin-top: 8px;
  overflow: hidden;
  display: block; /* Always block for animation */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.select-items.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
/* Container to keep everything centered and contained */
.gif-wrapper {
  max-width: 100%;
  margin: 30px auto;
  padding: 0 10px; /* Prevents touching screen edges on mobile */
  text-align: center;
}

/* The actual GIF fix */
.responsive-gif {
  display: block;
  max-width: 100%;    /* Never wider than the screen */
  height: auto;       /* Maintain aspect ratio */
  margin: 0 auto;     /* Center horizontally */
  border-radius: 15px;
  border: 1px solid var(--brd);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Adds a premium look */
}

.gif-text {
  font-size: 0.85rem;
  color: var(--sub);
  margin-top: 12px;
  line-height: 1.4;
}
/* 1. HEADER LAYOUT (Far Right Alignment) */
header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 15px 25px; 
}

.header-actions { 
  display: flex; 
  align-items: center; 
  gap: 2px; 
}

/* 2. HIDE BY DEFAULT (For non-home pages) */
.lang-select { 
  display: none; 
  position: relative; 
  cursor: pointer; 
}

/* 3. SHOW ONLY ON HOME PAGE */
body.show-lang .lang-select { 
  display: flex; 
}

.lang-box {
  background: transparent;
  padding: 10px;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--txt); /* Alive: Switches in Night Mode */
  display: flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}

/* 4. NIGHT MODE FRIENDLY ARROW (Same size as Moon/Sun) */
.lang-box::after {
  content: "";
  width: 5px;
  height: 5px;
  /* 2.2px - 2.5px matches your SVG stroke-width */
  border-right: 2.2px solid currentColor; 
  border-bottom: 2.2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
  margin-top: -3px;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Arrow Flip Animation */
.lang-select.active .lang-box::after { 
  transform: rotate(-135deg); 
  margin-top: 2px; 
}

/* 5. DROPDOWN MENU (AMOLED Black Friendly) */
.lang-list {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card); /* Pure black in dark mode */
  border: 1px solid var(--brd);
  border-radius: 16px;
  min-width: 150px;
  display: none;
  z-index: 3000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  overflow: hidden;
}

.lang-list.show { 
  display: block !important; 
}

.lang-list div {
  padding: 14px 18px;
  color: var(--txt);
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--brd);
}

.lang-list div:last-child { border-bottom: none; }
.lang-list div:hover { 
  background: var(--brd); 
  color: var(--accent); 
}
.lang-disabled {
  opacity: 0.5;      /* Makes it look faded */
  cursor: not-allowed; /* Shows a "blocked" icon on hover */
  color: var(--sub) !important;
}

.lang-disabled:hover {
  background: transparent !important; /* Prevents the hover effect */
  color: var(--sub) !important;
}
