/* ==========================================================================
   ToolsNexNova - Core Stylesheet
   ========================================================================== */

/* Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Tokens - Dark Mode (Default) */
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --bg-tertiary: #2b2b2b;
  --bg-quaternary: #3a3a3a;
  
  --text-primary: #ffffff;
  --text-secondary: #a5a5a5;
  --text-muted: #646464;
  
  --accent: #4f8cff;
  --accent-hover: #3373fa;
  --accent-glow: rgba(79, 140, 255, 0.45);
  --accent-light: rgba(79, 140, 255, 0.1);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  
  --card-bg: rgba(30, 30, 30, 0.65);
  --card-border: rgba(255, 255, 255, 0.05);
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  --success: #00e676;
  --error: #ff1744;
  --warning: #ffea00;
  
  --glass-bg: rgba(30, 30, 30, 0.45);
  --glass-border: rgba(255, 255, 255, 0.06);
  
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --max-width: 1200px;
  --header-height: 80px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Variables */
body.light-theme {
  --bg-primary: #f5f7fb;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eaeef6;
  --bg-quaternary: #d5def0;
  
  --text-primary: #121212;
  --text-secondary: #5f6368;
  --text-muted: #8c9099;
  
  --accent: #4f8cff;
  --accent-hover: #1a56c4;
  --accent-glow: rgba(79, 140, 255, 0.25);
  --accent-light: rgba(79, 140, 255, 0.08);
  
  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-border: rgba(0, 0, 0, 0.05);
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.06);
  
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(0, 0, 0, 0.05);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition: var(--transition);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* Container */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 15px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px stroke var(--glass-border);
  z-index: 1000;
  transition: var(--transition);
  display: flex;
  align-items: center;
}

.site-header.scrolled {
  background: var(--bg-secondary);
  box-shadow: var(--card-shadow);
  height: 70px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 40px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 8px 0;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Dropdown Menu */
.nav-item-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.dropdown-toggle svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  transition: var(--transition);
}

.nav-item-dropdown:hover .dropdown-toggle svg {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  width: 240px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
}

.nav-item-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(5px);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.dropdown-link:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.dropdown-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  box-shadow: var(--card-shadow);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle .sun-icon {
  display: none;
  width: 20px;
  height: 20px;
}

.theme-toggle .moon-icon {
  display: block;
  width: 20px;
  height: 20px;
}

body.light-theme .theme-toggle .sun-icon {
  display: block;
}

body.light-theme .theme-toggle .moon-icon {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  flex-direction: column;
  justify-content: space-around;
  z-index: 1001;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: var(--transition);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 80px 0 30px 0;
  margin-top: 100px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo {
  height: 40px;
  width: auto;
  align-self: flex-start;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-socials {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 36px;
  height: 36px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.social-link:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-3px);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link-item a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: inline-block;
}

.footer-link-item a:hover {
  color: var(--accent);
  transform: translateX(5px);
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.contact-info-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.contact-text strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.copyright {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-link {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-bottom-link:hover {
  color: var(--accent);
}

/* ==========================================================================
   Buttons and Forms
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 20px 0 var(--accent-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-quaternary);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: var(--transition);
  color: var(--text-primary);
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* ==========================================================================
   Glassmorphism Cards
   ========================================================================== */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 30px;
  transition: var(--transition);
}

.glass-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   Tool Page Specific Layout (Shared)
   ========================================================================== */
.tool-page-container {
  margin-top: calc(var(--header-height) + 40px);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs svg {
  width: 12px;
  height: 12px;
}

.tool-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}

.tool-header-sec {
  margin-bottom: 35px;
}

.tool-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.tool-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 15px;
  line-height: 1.2;
}

.tool-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 800px;
}

.tool-main-card {
  margin-bottom: 40px;
  padding: 40px;
}

.tool-content-sec {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  margin-top: 40px;
}

.tool-content-sec h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin: 35px 0 20px 0;
  color: var(--text-primary);
}

.tool-content-sec h2:first-of-type {
  margin-top: 0;
}

.tool-content-sec h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin: 25px 0 15px 0;
  color: var(--text-primary);
}

.tool-content-sec p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.7;
}

.tool-content-sec ol, .tool-content-sec ul {
  margin-left: 25px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.tool-content-sec li {
  margin-bottom: 10px;
}

/* FAQ Accordion */
.faq-sec {
  margin-top: 40px;
}

.faq-title-main {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 30px;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 20px 25px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  background: none;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-icon-arrow {
  width: 14px;
  height: 14px;
  fill: currentColor;
  transition: var(--transition);
}

.faq-item.active .faq-icon-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: rgba(0, 0, 0, 0.05);
}

.faq-answer-inner {
  padding: 0 25px 20px 25px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Sidebar Ads / Related Tools */
.sidebar-card {
  padding: 25px;
  margin-bottom: 30px;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.related-tools-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.related-tool-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.related-tool-item:hover {
  border-color: var(--accent);
  transform: translateX(5px);
}

.related-tool-icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.related-tool-info {
  display: flex;
  flex-direction: column;
}

.related-tool-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.related-tool-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}
