/* CSS Variables */
:root {
  --primary: #4f46e5;
  --text: #2d3748;
  --text-muted: #4a5568;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --radius: 12px;
}

/* Base Styles */
* { box-sizing: border-box; }

/* Table Reset */
table {
  border-spacing: 0;
  border-collapse: collapse;
}

table th, table td {
  padding: 0;
  text-align: inherit;
  vertical-align: top;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.header {
  background: var(--white);
  color: var(--text);
  padding: 30px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
}

.header p {
  margin: 10px 0 0 0;
  font-size: 1rem;
  opacity: 0.7;
}

.content { padding: 40px; }

/* Sections */
.section {
  margin: 40px 0;
}

/* Card Components */
.demo-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 20px 0;
  position: relative;
}

.demo-section {
  background: var(--bg);
  padding: 30px;
}

.demo-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.demo-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.demo-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.demo-item h4 {
  margin: 0 0 15px 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Feature Highlight */
.feature-highlight {
  background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
  border: 2px solid #68d391;
  border-radius: var(--radius);
  padding: 25px;
  margin: 20px 0;
  position: relative;
}

.feature-highlight::before {
  content: '✨';
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  opacity: 0.7;
}

.feature-highlight h4 {
  color: #22543d;
  margin: 0 0 15px 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.feature-highlight li {
  margin: 8px 0;
  color: #2f855a;
  line-height: 1.6;
}

/* Grid Layout */
.button-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
}

.logo-list {
  margin: 15px 0;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.logo-row:last-child {
  border-bottom: none;
}

.logo-row code {
  min-width: 140px;
  font-weight: bold;
}

/* Typography */
h1, h2, h3, h4 { color: var(--text); }
h2 {
  border-bottom: 2px solid var(--primary);
  padding-bottom: 10px;
  margin-bottom: 20px;
}
h3 { color: var(--primary); }
p, li { color: var(--text-muted); }
strong { color: var(--text); }

/* Code Blocks */
pre.code-block {
  background: #272822 !important;
  border: 1px solid #3e3d32 !important;
  border-radius: 8px;
  padding: 20px !important;
  font-family: 'Fira Code', monospace !important;
  font-size: 0.9rem !important;
  margin: 15px 0 !important;
  overflow-x: auto;
  color: #f8f8f2 !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important;
}

pre.code-block .keyword { color: #f92672; }
pre.code-block .string { color: #e6db74; }
pre.code-block .number { color: #ae81ff; }
pre.code-block .comment { color: #75715e; font-style: italic; }

/* Tables - Force Override Browser Defaults */
table.properties-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 20px 0 !important;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border) !important;
  background: var(--white) !important;
}

table.properties-table th {
  background: var(--primary) !important;
  color: var(--white) !important;
  padding: 16px 20px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 0.85rem !important;
  text-align: left !important;
  letter-spacing: 0.5px !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1) !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
}

table.properties-table td {
  padding: 16px 20px !important;
  border-bottom: 1px solid var(--border) !important;
  vertical-align: top !important;
  text-align: left !important;
  border-left: none !important;
  border-right: none !important;  border-top: none !important;
}

table.properties-table tbody tr:hover {
  background: linear-gradient(135deg, var(--bg) 0%, #f0f4f8 100%) !important;
}

table.properties-table tbody tr:last-child td {
  border-bottom: none !important;
}

table.properties-table code {
  background: linear-gradient(135deg, var(--bg) 0%, #e8f2ff 100%) !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  color: var(--primary) !important;
  font-family: 'Fira Code', monospace !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  border: 1px solid #d1e7ff !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  body { padding: 10px; }
  .container { border-radius: 12px; }
  .header { padding: 30px 20px; }
  .header h1 { font-size: 2rem; }
  .content { padding: 25px 20px; }
  .demo-section { padding: 20px; }
  .properties-table th, .properties-table td { padding: 12px 15px !important; }
}

@media (max-width: 480px) {
  .header h1 { font-size: 1.5rem; }
  .content { padding: 20px 15px; }
  .demo-section { padding: 15px; }
  .properties-table th, .properties-table td { padding: 10px 12px !important; font-size: 0.8rem !important; }
  .logo-list { margin: 10px 0; }
  .logo-row { 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 8px;
    padding: 12px 0;
  }
  .logo-row code { min-width: auto; }
}

.deprecated-prop {
  opacity: 0.7;
  background-color: #fff3cd;
}
.deprecated-badge {
  background: #f39c12;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
}

/* Focus States */
.demo-item:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  body { background: white; padding: 0; }
  .container { box-shadow: none; border-radius: 0; }
  .header { background: var(--primary) !important; }
}
