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

:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout */
.app-container {
  display: flex;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background-color: var(--surface-color);
  border-right: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.nav-list {
  list-style: none;
}

.nav-item {
  margin-bottom: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  background-color: #f1f5f9;
  color: var(--primary-color);
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  max-width: 900px;
}

header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

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

.tool-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.tool-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.tool-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Tool Interface Area */
.tool-interface {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--bg-color);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-block {
  width: 100%;
}

/* Result Area */
.result-box {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1.1rem;
  word-break: break-all;
}

/* Ad Placement Placeholder */
.ad-container {
  background-color: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 1.5rem 0;
  position: relative;
  overflow: hidden;
}

.ad-container::before {
  content: 'ADVERTISEMENT';
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

/* SEO Content Toggle */
.seo-details {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-top: 1rem;
}

.seo-summary {
  padding: 1.5rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--primary-color);
  list-style: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.seo-summary:hover {
  background-color: rgba(79, 70, 229, 0.04);
}
.seo-summary::-webkit-details-marker {
  display: none;
}
.seo-summary::before {
  content: '▼ ';
  font-size: 0.85em;
  display: inline-block;
  transition: transform 0.2s;
  margin-right: 0.5rem;
}
.seo-details[open] .seo-summary::before {
  transform: rotate(180deg);
}
.seo-details[open] .seo-summary {
  border-bottom: 1px solid var(--border-color);
}

/* SEO Content Area */
.seo-content {
  padding: 2.5rem;
}

.seo-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.seo-content h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

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

.seo-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.seo-content li {
  margin-bottom: 0.5rem;
}

/* Cross Links */
.cross-links {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-top: 2rem;
}

.cross-links h3 {
  font-size: 1.1rem;
  color: #1e3a8a;
  margin-bottom: 0.75rem;
}

.cross-link-btn {
  display: inline-block;
  background-color: white;
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  margin: 0.25rem;
}

.cross-link-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    margin-bottom: 0;
  }
  
  .nav-list {
    display: none; /* Mobile menu toggle would go here */
  }
  
  .main-content {
    padding: 1.5rem 1rem;
  }
  
  .tool-interface {
    padding: 1.5rem;
  }
  
  .seo-content {
    padding: 1.5rem;
  }
}
