﻿/* Modern CSS Reset and Base Styles */
* {
  box-sizing: border-box;
}

:root {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #dbeafe;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --light-color: #f8fafc;
  --dark-color: #1e293b;
  --border-color: #e2e8f0;
  --text-muted: #64748b;
  --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);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
  --border-radius: 0.75rem;
  --border-radius-sm: 0.5rem;
  --border-radius-lg: 1rem;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: #f8fafc;
  margin: 0;
  padding: 0;
}

/* Header and Navigation */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-color) !important;
  text-decoration: none;
}

.navbar-brand:hover {
  color: var(--primary-color) !important;
}

.nav-link {
  font-weight: 500;
  color: var(--secondary-color) !important;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
}

/* Cards and Elevated Elements */
.elevated-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.elevated-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, #e0f2fe 100%);
  border-radius: var(--border-radius-lg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.hero-title {
  font-weight: 700;
  color: var(--dark-color);
  line-height: 1.2;
}

.chip {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Forms */
.form-control,
.form-select {
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  background-color: white;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.form-label {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  background: #059669;
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-success {
  background: transparent;
  color: var(--success-color);
  border: 2px solid var(--success-color);
}

.btn-outline-success:hover {
  background: var(--success-color);
  color: white;
}

.btn-outline-danger {
  background: transparent;
  color: var(--danger-color);
  border: 2px solid var(--danger-color);
}

.btn-outline-danger:hover {
  background: var(--danger-color);
  color: white;
}

.btn-outline-secondary {
  background: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--border-color);
}

.btn-outline-secondary:hover {
  background: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
}

.btn-outline-warning {
  background: transparent;
  color: var(--warning-color);
  border: 2px solid var(--warning-color);
}

.btn-outline-warning:hover {
  background: var(--warning-color);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Badges */
.badge {
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: var(--border-radius-sm);
}

.text-bg-success {
  background-color: var(--success-color) !important;
  color: white !important;
}

.text-bg-warning {
  background-color: var(--warning-color) !important;
  color: white !important;
}

.text-bg-light {
  background-color: var(--light-color) !important;
  color: var(--dark-color) !important;
}

/* Tables */
.table {
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.table thead th {
  background-color: var(--light-color);
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  color: var(--dark-color);
  padding: 1rem;
}

.table tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: rgba(59, 130, 246, 0.02);
}

/* List Groups */
.list-group-item {
  border: 1px solid var(--border-color);
  padding: 1rem;
  transition: all 0.2s ease;
}

.list-group-item:hover {
  background-color: var(--light-color);
}

.list-group-flush .list-group-item {
  border-left: none;
  border-right: none;
}

.list-group-flush .list-group-item:first-child {
  border-top: none;
}

.list-group-flush .list-group-item:last-child {
  border-bottom: none;
}

/* Chat Styles */
.chat-list {
  background-color: #f8fafc;
  border-radius: var(--border-radius-sm);
}

.chat-input {
  background: white;
  border-top: 1px solid var(--border-color);
}

/* Video Styles */
.video-box {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
}

.video-remote {
  background: linear-gradient(45deg, #374151 25%, transparent 25%),
    linear-gradient(-45deg, #374151 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #374151 75%),
    linear-gradient(-45deg, transparent 75%, #374151 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.video-local {
  background: linear-gradient(45deg, #4b5563 25%, transparent 25%),
    linear-gradient(-45deg, #4b5563 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #4b5563 75%),
    linear-gradient(-45deg, transparent 75%, #4b5563 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
}

/* Footer */
.site-footer {
  background: white;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

/* Utility Classes */
.text-muted {
  color: var(--text-muted) !important;
}

.fw-semibold {
  font-weight: 600;
}

.fw-bold {
  font-weight: 700;
}

.rounded-circle {
    width: 80px;
    height: 80px;
}

.bg-primary-light {
  background-color: rgba(59, 130, 246, 0.1) !important;
}

.bg-success-light {
  background-color: rgba(16, 185, 129, 0.1) !important;
}

.bg-warning-light {
  background-color: rgba(245, 158, 11, 0.1) !important;
}

.bg-danger-light {
  background-color: rgba(239, 68, 68, 0.1) !important;
}

.bg-info-light {
  background-color: rgba(59, 130, 246, 0.1) !important;
}

.h-100 {
  height: 100% !important;
}

.display-6 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
}

.flex-fill {
  flex: 1 1 auto !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    padding: 2rem 1rem !important;
  }

  .hero-title {
    font-size: 2rem;
  }

  .btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  .elevated-card {
    margin-bottom: 1rem;
  }

  .table-responsive {
    border-radius: var(--border-radius-sm);
  }
}

/* Animation Classes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .btn {
    display: none !important;
  }

  .elevated-card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
