/* ArenaMediaCloud - Professional Tools for Sports Streaming */
/* Global Stylesheet */

/* CSS Variables - Design System */
:root {
  --primary: #0f172a;
  --primary-light: #1e3a5f;
  --accent: #e11d48;
  --accent-2: #0ea5e9;
  --secondary: #10b981;
  --bg: #f1f5f9;
  --bg-card: #ffffff;
  --bg-dark: #0f172a;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 10px;
  --radius-sm: 6px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background-color: var(--primary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
}

.logo i {
  color: var(--accent);
  font-size: 1.5rem;
}

.logo strong {
  color: var(--accent-2);
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.main-nav a:hover {
  color: white;
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Main Content */
.page-main {
  padding: 2rem 0 4rem;
  min-height: calc(100vh - var(--header-height) - 300px);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--accent-2);
}

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

/* Page Title & Intro */
.page-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.page-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 800px;
}

/* Calculator Layout */
.calc-layout {
  display: grid;
  grid-template-columns: 62% 38%;
  gap: 2rem;
}

@media (max-width: 968px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
}

/* Calculator Card */
.calc-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.calc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
}

.calc-header h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  color: white;
  margin: 0;
}

.calc-header h2 i {
  color: var(--accent-2);
}

.category-badge {
  background: rgba(255,255,255,0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Calculator Inputs */
.calc-inputs {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

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

.input-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input,
.input-wrapper select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.unit-label {
  position: absolute;
  right: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* Calculator Results */
.calc-results {
  padding: 1.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg-card) 100%);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.result-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.result-card.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
}

.result-card.primary .result-label {
  color: rgba(255,255,255,0.8);
}

.result-card.primary .result-value {
  color: white;
}

.result-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.result-card.good .result-value { color: var(--secondary); }
.result-card.warning .result-value { color: #f59e0b; }
.result-card.critical .result-value { color: var(--accent); }

.copy-btn {
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.2);
}

/* Results Table */
.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.results-table th,
.results-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.results-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f8fafc;
}

.results-table tr:hover td {
  background: #f8fafc;
}

/* Content Sections */
.content-section {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.content-section h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.content-section h2 i {
  color: var(--accent-2);
}

.content-section p {
  color: var(--text);
  line-height: 1.7;
}

.content-section ul,
.content-section ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

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

/* Reference Table */
.ref-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.ref-table th,
.ref-table td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid var(--border);
}

.ref-table th {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.ref-table tr:nth-child(even) {
  background: #f8fafc;
}

/* FAQ Section */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 500;
  cursor: pointer;
  background: #f8fafc;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
}

.faq-item[open] summary {
  background: var(--primary);
  color: white;
}

.faq-item[open] summary::after {
  color: white;
}

.faq-answer {
  padding: 1rem 1.25rem;
  color: var(--text);
  line-height: 1.7;
}

/* Sidebar */
.calc-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.sidebar-widget h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.sidebar-widget h3 i {
  color: var(--accent-2);
}

.related-list {
  list-style: none;
  margin: 0;
}

.related-list li {
  margin-bottom: 0.5rem;
}

.related-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.related-list a:hover {
  background: #f1f5f9;
  color: var(--accent-2);
}

.related-list a i {
  color: var(--accent-2);
  font-size: 0.8rem;
}

.tips-widget ul {
  list-style: none;
  margin: 0;
}

.tips-widget li {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

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

.tips-widget li i {
  color: var(--secondary);
  margin-top: 0.25rem;
}

/* Homepage Styles */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.hero-stat {
  text-align: center;
}

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

.hero-stat-label {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
}

/* Category Cards */
.categories-section {
  padding: 3rem 0;
}

.categories-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 2px solid transparent;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-2);
}

.category-card i {
  font-size: 2.5rem;
  color: var(--accent-2);
  margin-bottom: 1rem;
}

.category-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.category-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.category-card .tool-count {
  display: inline-block;
  background: var(--bg);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Featured Tools */
.featured-section {
  padding: 3rem 0;
  background: white;
}

.featured-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tool-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-2);
}

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tool-card-header i {
  font-size: 1.25rem;
  color: var(--accent-2);
}

.tool-card h3 {
  font-size: 1rem;
  margin: 0;
}

.tool-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-2);
}

.tool-card-link:hover {
  color: var(--accent);
}

/* Why Section */
.why-section {
  padding: 3rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, white 100%);
}

.why-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.feature-item {
  text-align: center;
  padding: 1.5rem;
}

.feature-item i {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.feature-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.feature-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: white;
  padding: 3rem 0 1.5rem;
}

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

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

.footer-links h4 {
  color: white;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  margin: 0;
}

.footer-bottom a {
  color: rgba(255,255,255,0.7);
}

.footer-bottom a:hover {
  color: white;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }

  .main-nav.active {
    display: flex;
  }

  .main-nav a {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .nav-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .input-grid {
    grid-template-columns: 1fr;
  }

  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-title {
    font-size: 1.5rem;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .calc-sidebar,
  .site-footer {
    display: none;
  }

  .calc-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .page-main {
    padding: 0;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--secondary); }
.text-warning { color: #f59e0b; }
.text-danger { color: var(--accent); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* Formula Display */
.formula-box {
  background: #f8fafc;
  border-left: 4px solid var(--accent-2);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

/* Checkbox & Toggle Styles */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.toggle-wrapper input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-2);
}

/* Range Slider */
input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-2);
  cursor: pointer;
}

/* Code/Preformatted */
code {
  background: #f1f5f9;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

pre {
  background: #f8fafc;
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.875rem;
}

/* Note/Info Boxes */
.info-box {
  background: #e0f2fe;
  border-left: 4px solid var(--accent-2);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.info-box p {
  margin: 0;
  color: #0369a1;
}

.warning-box {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.warning-box p {
  margin: 0;
  color: #92400e;
}

/* Comparison Cards */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.comparison-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.comparison-card.winner {
  border-color: var(--secondary);
  background: #f0fdf4;
}

.comparison-card h4 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--secondary));
  border-radius: 4px;
  transition: width 0.3s ease;
}

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

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

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

.checklist li i {
  color: var(--secondary);
  margin-top: 0.25rem;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.75rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  background: var(--accent-2);
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--accent-2);
}

.timeline-item h4 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.timeline-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}
