/* SEO Toolkit - Clean, Professional Design */
:root {
  --primary: #2563EB;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 12px;
  --shadow: 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);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo svg {
  width: 32px;
  height: 32px;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Tool Grid */
.tools-section {
  padding: 60px 0;
}

.tools-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--gray-800);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Tool Card */
.tool-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
  border: 1px solid var(--gray-200);
}

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

.tool-card-icon {
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.tool-card-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.tool-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--gray-800);
}

.tool-card p {
  color: var(--gray-600);
  font-size: 0.95rem;
}

.tool-card .why {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
  font-size: 0.85rem;
  color: var(--gray-500);
}

.tool-card .why strong {
  color: var(--primary);
}

/* Page Layout */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 48px 0;
}

.page-header h1 {
  font-size: 2.25rem;
  margin-bottom: 8px;
}

.page-header p {
  opacity: 0.9;
  max-width: 700px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  opacity: 0.8;
}

.breadcrumb a {
  color: white;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Main Content */
.main-content {
  padding: 40px 0 80px;
}

/* Info Box */
.info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 32px;
}

.info-box h3 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-box p {
  color: var(--gray-700);
  font-size: 0.95rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--gray-700);
}

.form-group .hint {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 4px;
}

input[type="text"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

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

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

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
}

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

.btn-success:hover {
  background: #059669;
}

.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Cards */
.card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.card h3 {
  margin-bottom: 16px;
  color: var(--gray-800);
}

/* Preview Boxes */
.preview-box {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}

.preview-box h3 {
  font-size: 1rem;
  color: var(--gray-600);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Google Preview */
.google-preview {
  font-family: Arial, sans-serif;
  max-width: 600px;
}

.google-preview .title {
  color: #1a0dab;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 4px;
  cursor: pointer;
}

.google-preview .title:hover {
  text-decoration: underline;
}

.google-preview .url {
  color: #006621;
  font-size: 14px;
  margin-bottom: 4px;
}

.google-preview .description {
  color: #545454;
  font-size: 14px;
  line-height: 1.5;
}

/* Social Previews */
.social-preview {
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  overflow: hidden;
  max-width: 500px;
}

.social-preview .image {
  height: 260px;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
}

.social-preview .content {
  padding: 12px;
  background: var(--gray-50);
}

.social-preview .domain {
  font-size: 12px;
  color: var(--gray-500);
  text-transform: uppercase;
}

.social-preview .title {
  font-weight: 600;
  color: var(--gray-800);
  margin: 4px 0;
}

.social-preview .desc {
  font-size: 14px;
  color: var(--gray-600);
}

/* Character Count */
.char-count {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-top: 4px;
}

.char-count .count {
  color: var(--gray-500);
}

.char-count .count.warning {
  color: var(--warning);
}

.char-count .count.danger {
  color: var(--danger);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

/* Checklist */
.checklist {
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.checklist li:last-child {
  border-bottom: none;
}

.checklist .icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checklist .icon.success {
  background: var(--success);
  color: white;
}

.checklist .icon.warning {
  background: var(--warning);
  color: white;
}

.checklist .icon.danger {
  background: var(--danger);
  color: white;
}

/* Code Output */
.code-output {
  background: var(--gray-800);
  color: #e5e7eb;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  position: relative;
}

.code-output pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--gray-600);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.copy-btn:hover {
  background: var(--gray-500);
}

.copy-btn.copied {
  background: var(--success);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.stat-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-card .label {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-top: 4px;
}

/* Heading Tree */
.heading-tree {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 20px;
}

.heading-tree .heading-item {
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.heading-tree .heading-item.h1 { padding-left: 0; }
.heading-tree .heading-item.h2 { padding-left: 24px; }
.heading-tree .heading-item.h3 { padding-left: 48px; }
.heading-tree .heading-item.h4 { padding-left: 72px; }
.heading-tree .heading-item.h5 { padding-left: 96px; }
.heading-tree .heading-item.h6 { padding-left: 120px; }

.heading-tree .tag {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.heading-tree .text {
  color: var(--gray-700);
}

/* Rules List */
.rules-list {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}

.rule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.rule-item:last-child {
  border-bottom: none;
}

.rule-item .rule-text {
  font-family: monospace;
  color: var(--gray-700);
}

.rule-item .delete-btn {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 4px 8px;
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 24px;
}

.tab {
  padding: 12px 24px;
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--gray-700);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Tips List */
.tips-list {
  list-style: none;
}

.tips-list li {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.tips-list li h4 {
  color: var(--gray-800);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tips-list li p {
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* Grid Layouts */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .page-header h1 {
    font-size: 1.75rem;
  }
  
  .nav {
    display: none;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: help;
}

.tooltip .tooltip-icon {
  width: 16px;
  height: 16px;
  background: var(--gray-300);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}

.tooltip .tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-800);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  z-index: 10;
  transition: opacity 0.2s;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Footer */
.footer {
  background: var(--gray-800);
  color: var(--gray-400);
  padding: 40px 0;
  text-align: center;
}

.footer a {
  color: white;
  text-decoration: none;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeIn 0.3s ease-out;
}

/* Schema Type Cards */
.schema-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.schema-type-btn {
  padding: 16px;
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.schema-type-btn:hover {
  border-color: var(--primary-light);
}

.schema-type-btn.active {
  border-color: var(--primary);
  background: #eff6ff;
}

.schema-type-btn .icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.schema-type-btn .name {
  font-weight: 600;
  color: var(--gray-700);
}
