/* Altervision - Shared Styles */
/* ============================= */

/* CSS Variables */
:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #34495e;
  --success-color: #2ecc71;
  --warning-color: #f59e0b;
  --border-radius: 6px;
  --box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  --hero-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --accent-gradient: linear-gradient(45deg, #3498db, #2980b9);
  --tech-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  color: var(--dark-color);
  background-color: #f5f7fa;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--secondary-color);
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Container & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Banner */
.top-banner {
  background: var(--hero-gradient);
  color: white;
  text-align: center;
  padding: 8px 0;
  font-size: 0.9rem;
}

.top-banner a {
  color: white;
  text-decoration: underline;
  font-weight: 500;
}

/* Header */
.main-header {
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 20px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 40px;
  width: auto;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: var(--primary-color);
}

/* Buttons */
.btn, .cta-button, .demo-button {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover, .cta-button:hover, .demo-button:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success-color);
}

.btn-success:hover {
  background: #27ae60;
}

.btn-gradient {
  display: block;
  width: 100%;
  padding: 1.25rem 0;
  margin: 1.5rem 0;
  border-radius: 16px;
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(90deg, #51d6ff 0%, #1676ff 100%);
  box-shadow: 0 6px 24px 0 rgba(52,152,219,0.13), 0 1.5px 0 #eaf6ff inset;
  border: none;
  cursor: pointer;
  color: #fff;
  letter-spacing: 0.03em;
  position: relative;
  transition: box-shadow 0.2s, transform 0.14s, background 0.18s;
  overflow: hidden;
}

.btn-gradient::before {
  /* Soft light reflection */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0.04) 100%);
  border-radius: 16px 16px 0 0;
  pointer-events: none;
}

.btn-gradient:active {
  transform: scale(0.98) translateY(1px);
  box-shadow: 0 2px 8px rgba(52,152,219,0.08);
  background: linear-gradient(90deg, #2ab5e8 0%, #1051a5 100%);
}

.btn-gradient:hover {
  background: linear-gradient(90deg, #64e1ff 0%, #198cff 100%);
  box-shadow: 0 10px 28px 0 rgba(52,152,219,0.18);
  transform: translateY(-3px) scale(1.02);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Hero Section */
.hero, .hero-section {
  background: var(--hero-gradient);
  color: white;
  padding: 4rem 20px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title, .hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  background: linear-gradient(45deg, #fff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle, .hero .subtitle {
  font-size: 1.3rem;
  opacity: 0.95;
  margin-bottom: 2rem;
  line-height: 1.5;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.feature-icon {
  font-size: 1.2rem;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.info-section {
  max-width: 1200px;
  margin: -2rem auto 2rem;
  padding: 0 20px;
  position: relative;
  z-index: 100;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
  background: var(--hero-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Cards */
.card, .panel, .info-card {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--box-shadow);
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.card:hover, .panel:hover, .info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.info-card {
  text-align: center;
}

.card-icon, .info-icon {
  width: 60px;
  height: 60px;
  background: var(--hero-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.info-icon {
  font-size: 2.5rem;
  width: auto;
  height: auto;
  background: none;
}

.card h3, .info-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.card p, .info-card p {
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Panel Enhancements */
.panel h2 {
  margin-bottom: 20px;
  color: var(--secondary-color);
  font-size: 1.6rem;
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel h2::before {
  content: "⚙️";
  font-size: 1.2rem;
}

.panel h3 {
  margin: 20px 0 10px;
  color: var(--secondary-color);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark-color);
}

.radio-group {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.radio-group label {
  display: flex;
  align-items: center;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  transition: background-color 0.3s ease;
}

.radio-group label:hover {
  background-color: #f8f9fa;
}

.radio-group input {
  margin-right: 8px;
}

input[type="file"] {
  display: block;
  width: 100%;
  padding: 12px;
  border: 2px dashed #ddd;
  border-radius: var(--border-radius);
  margin-bottom: 15px;
  transition: border-color 0.3s ease;
  font-size: 0.95rem;
}

input[type="file"]:hover {
  border-color: var(--primary-color);
}

input[type="range"] {
  width: 100%;
  margin: 8px 0;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
}

input[type="color"] {
  padding: 0;
  width: 60px;
  height: 40px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
}

.value-display {
  display: inline-block;
  width: 50px;
  text-align: right;
  font-weight: 600;
  color: var(--primary-color);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  max-height: 280px;
  overflow-y: auto;
  padding: 15px;
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  background: #f8f9fa;
}

.thumbnail {
  cursor: pointer;
  border: 3px solid transparent;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.thumbnail img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}

.thumbnail.selected {
  border-color: var(--primary-color);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.thumbnail:hover:not(.selected) {
  border-color: #bdc3c7;
  transform: scale(1.02);
}

.image-preview {
  width: 100%;
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-top: 20px;
  background: white;
}

.image-preview img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  display: block;
}

/* Stats Section */
.stats {
  background: var(--dark-color);
  color: white;
  padding: 4rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--success-color);
  display: block;
}

.stat-label {
  font-size: 1.1rem;
  opacity: 0.8;
  margin-top: 0.5rem;
}

/* Team Section */
.team-member {
  text-align: center;
  padding: 1.5rem;
}

.team-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: var(--hero-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  font-weight: bold;
}

.team-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.team-role {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Technology Page Specific */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.tech-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border-left: 4px solid var(--primary-color);
}

.tech-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.code-block {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 1.5rem;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.spec-table th,
.spec-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.spec-table th {
  background: #f8fafc;
  font-weight: 600;
}

/* Badges */
.tech-badge {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-left: 8px;
}

.badge-success {
  background: var(--success-color);
}

.badge-warning {
  background: var(--warning-color);
}

/* Processing Info */
.processing-info {
  background: #e8f4f8;
  border: 1px solid #bee5eb;
  border-radius: var(--border-radius);
  padding: 15px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: #0c5460;
}

.alert {
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.alert-info {
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  color: #1565c0;
}

.alert-warning {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  color: #856404;
}

.alert-success {
  background: #d4edda;
  border-left: 4px solid #28a745;
  color: #155724;
}

/* Results */
.result-container {
  margin-top: 30px;
  text-align: center;
}

#progress {
  padding: 15px;
  margin-bottom: 20px;
  font-weight: 600;
  min-height: 50px;
  background: #f8f9fa;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

#resultVid {
  max-width: 100%;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  background: #000;
}

/* Footer */
.footer {
  background: var(--secondary-color);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--success-color);
}

.footer-section a {
  color: #94a3b8;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1rem;
  text-align: center;
  color: #94a3b8;
}

.footer-links {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* Utility Classes */
.hide {
  display: none;
}

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-color);
}

.bg-light {
  background-color: var(--light-color);
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  .hero-title, .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero-subtitle, .hero .subtitle {
    font-size: 1.1rem;
  }
  
  .hero-features {
    gap: 1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .grid, .grid-2, .grid-4 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
  }

  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .tech-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-links {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title, .hero h1 {
    font-size: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .radio-group {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}