/* Global Styles and Theme Variables */
:root {
  /* Color Palette - Red/Orange Gradient Theme */
  --primary-red: #ff416c;
  --primary-orange: #ff4b2b;
  --primary-gradient: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-orange) 100%);
  --primary-gradient-hover: linear-gradient(135deg, #ff2a58 0%, #fa3a19 100%);
  
  /* Light Mode (Default) */
  --bg-color: #f4f7f6;
  --text-color: #2c3e50;
  --text-light: #7f8c8d;
  --card-bg: #ffffff;
  --nav-bg: #ffffff;
  --border-color: #e0e0e0;
  --footer-bg: #1a1a2e;
  --footer-text: #ecf0f1;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(255, 65, 108, 0.2);
  
  /* Transitions */
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  --bg-color: #0f172a;
  --text-color: #f8fafc;
  --text-light: #94a3b8;
  --card-bg: #1e293b;
  --nav-bg: #1e293b;
  --border-color: #334155;
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  color: var(--primary-orange);
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

/* Header & Navigation */
header {
  background-color: var(--nav-bg);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.logo a {
  font-size: 1.8rem;
  font-weight: 900;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 600;
  font-size: 1rem;
}

.nav-links a:hover {
  color: var(--primary-red);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--card-bg);
  box-shadow: var(--shadow-lg);
  border-radius: 8px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  padding: 0.5rem 0;
  border: 1px solid var(--border-color);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.dropdown-menu li a:hover {
  background-color: rgba(255, 65, 108, 0.05);
  color: var(--primary-red);
}

/* Theme Toggle & Mobile Menu */
.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.8rem;
  color: var(--text-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff !important;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--primary-gradient-hover);
}

/* Main Content */
main {
  flex: 1;
  width: 100%;
}

/* Hero Section */
.hero {
  background: var(--primary-gradient);
  color: white;
  padding: 6rem 5%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: 0;
  width: 100%;
  height: 100px;
  background: var(--bg-color);
  transform: skewY(-2deg);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-white {
  background: white;
  color: var(--primary-red) !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-outline {
  border: 2px solid white;
  color: white !important;
  background: transparent;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

/* Section Container */
.section-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 5%;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-color);
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.tool-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 65, 108, 0.3);
}

.tool-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 65, 108, 0.1);
  color: var(--primary-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.tool-card:hover .tool-icon {
  background: var(--primary-gradient);
  color: white;
}

.tool-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.tool-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  flex-grow: 1;
}

/* Tool Page Specifics */
.tool-header {
  text-align: center;
  padding: 3rem 5% 2rem;
}

.tool-workspace {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 2rem;
  border: 1px solid var(--border-color);
  margin-bottom: 3rem;
}

.dropzone {
  border: 2px dashed var(--primary-red);
  border-radius: 12px;
  padding: 4rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(255, 65, 108, 0.02);
}

.dropzone:hover, .dropzone.dragover {
  background: rgba(255, 65, 108, 0.05);
  border-color: var(--primary-orange);
}

.dropzone i {
  font-size: 3rem;
  color: var(--primary-red);
  margin-bottom: 1rem;
}

.dropzone p {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.dropzone span {
  color: var(--text-light);
  font-size: 0.9rem;
}

.tool-controls {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-group label {
  font-weight: 600;
}

.settings-group input, .settings-group select {
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: inherit;
}

.result-area {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: none; /* Hidden by default */
  text-align: center;
}

.result-area.active {
  display: block;
}

/* Content Sections (SEO & Instructions) */
.content-section {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
  border: 1px solid var(--border-color);
}

.content-section h2 {
  color: var(--primary-red);
  margin-bottom: 1.5rem;
}

.content-section h3 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.content-section p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.content-section ul {
  list-style: disc inside;
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* AdSense Placeholders */
.ad-placeholder {
  width: 100%;
  min-height: 90px;
  background: var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
  border-radius: 8px;
  margin: 2rem 0;
  border: 1px dashed var(--text-light);
}

/* Footer */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 4rem 5% 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 3rem;
}

.footer-col h3 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 900;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  margin-bottom: 1rem;
}

.footer-col p {
  color: #aaa;
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.8rem;
}

.footer-col a {
  color: #aaa;
}

.footer-col a:hover {
  color: var(--primary-red);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  color: #888;
  font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--nav-bg);
    flex-direction: column;
    padding: 2rem;
    transition: var(--transition);
    align-items: flex-start;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    display: none;
    padding-left: 1rem;
  }
  
  .dropdown.active .dropdown-menu {
    display: block;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
}

/* Utility Classes */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
