/* Base styles */
:root {
  --background: #000000;
  --foreground: #f2f2f2;
  --card: #1a1a1a;
  --card-foreground: #f2f2f2;
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-foreground: #f2f2f2;
  --secondary: #27272a;
  --secondary-foreground: #f2f2f2;
  --muted: #262626;
  --muted-foreground: #a1a1aa;
  --accent: #1f1f23;
  --accent-foreground: #f2f2f2;
  --destructive: #991b1b;
  --destructive-foreground: #f2f2f2;
  --border: #27272a;
  --input: #27272a;
  --ring: #10b981;
  --radius: 0.5rem;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to right, #111111, #000000);
  border-bottom: 1px solid rgba(16, 185, 129, 0.3);
}

.matrix-code {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background: linear-gradient(180deg, rgba(0, 255, 70, 0.15) 0%, rgba(0, 255, 70, 0.05) 100%);
  height: 100%;
  width: 100%;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  position: relative;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i {
  font-size: 2rem;
  color: var(--primary);
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  letter-spacing: -0.025em;
}

.system-status {
  font-size: 0.75rem;
  color: rgba(16, 185, 129, 0.7);
  font-family: monospace;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Main content */
main {
  padding: 2rem 0;
}

/* Cards */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 2rem;
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.card-description {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.card-content {
  padding: 1.5rem;
}

.card-footer {
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
}

/* Form elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-group {
    flex-direction: row;
  }
}

.input {
  padding: 0.5rem 1rem;
  background-color: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 0.875rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn i {
  margin-right: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border: none;
}

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

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.5);
}

.btn-outline:hover {
  background-color: rgba(16, 185, 129, 0.1);
}

.btn-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
  border: none;
}

.btn-ghost:hover {
  background-color: var(--accent);
}

.btn-danger {
  color: #f87171;
  background-color: transparent;
  border: none;
}

.btn-danger:hover {
  background-color: rgba(248, 113, 113, 0.1);
  color: #ef4444;
}

/* Camera list */
.cameras-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
}

.camera-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .camera-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .camera-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.camera-card {
  display: flex;
  flex-direction: column;
}

.camera-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 0.5rem;
}

.camera-title {
  font-size: 1rem;
  font-weight: 600;
  font-family: monospace;
}

.camera-ip {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-family: monospace;
}

.camera-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.status-online {
  background-color: #059669;
  color: white;
}

.status-offline {
  background-color: #dc2626;
  color: white;
}

.status-unknown {
  background-color: #4b5563;
  color: white;
}

.last-checked {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  padding-top: 0.5rem;
}

.empty-list {
  grid-column: 1 / -1;
}

.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.empty-message {
  text-align: center;
  color: var(--muted-foreground);
}

.empty-message i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.2;
}

.text-lg {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.text-sm {
  font-size: 0.875rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.5rem 0;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 50;
}

.toast {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  max-width: 350px;
  animation: slideIn 0.3s ease-out;
}

.toast-success {
  border-left: 4px solid var(--primary);
}

.toast-error {
  border-left: 4px solid var(--destructive);
}

.toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.toast-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

