/* Custom styles to enhance Bootstrap */

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

/* Navbar Enhancements */
.navbar {
  background: var(--primary-gradient) !important;
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-size: 1.5rem;
}

/* Card Enhancements */
.card {
  border-radius: 20px;
  transition: all 0.3s ease;
  box-shadow: var(--card-shadow);
}

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

.webhook-info-card {
  border-left: 5px solid #28a745;
  animation: slideInUp 0.6s ease-out;
}

/* Icons */
.webhook-icon i {
  font-size: 4rem;
  opacity: 0.8;
}

.success-icon i {
  font-size: 2rem;
}

.events-icon i {
  font-size: 1.5rem;
}

/* Button Enhancements */
.btn {
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--primary-gradient);
  border: none;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Webhook URL Styling */
.webhook-url-container {
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 10px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.webhook-url-container:hover {
  border-color: #6c757d;
  background: #e9ecef;
}

.webhook-url {
  color: #495057;
  font-size: 0.9rem;
  word-break: break-all;
  font-weight: 600;
}

/* Events List */
.events-list {
  max-height: 500px;
  overflow-y: auto;
}

.events-list::-webkit-scrollbar {
  width: 8px;
}

.events-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.events-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

.events-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Event Item Styling */
.event-item {
  border-left: 4px solid #007bff;
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-radius: 0 15px 15px 0;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  animation: slideInRight 0.5s ease-out;
}

.event-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.event-item.event-post {
  border-left-color: #28a745;
}

.event-item.event-get {
  border-left-color: #17a2b8;
}

.event-item.event-put {
  border-left-color: #ffc107;
}

.event-item.event-delete {
  border-left-color: #dc3545;
}

.event-header {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0 10px 0 0;
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
}

.event-method {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.method-get {
  background: linear-gradient(135deg, #17a2b8, #138496);
  color: white;
}

.method-post {
  background: linear-gradient(135deg, #28a745, #218838);
  color: white;
}

.method-put {
  background: linear-gradient(135deg, #ffc107, #e0a800);
  color: #212529;
}

.method-delete {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

.method-patch {
  background: linear-gradient(135deg, #6f42c1, #5a32a3);
  color: white;
}

.event-timestamp {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 500;
}

.event-details {
  padding: 16px;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.85rem;
  background: #f8f9fa;
  border-radius: 0 0 10px 0;
  overflow-x: auto;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* JSON Syntax Highlighting */
.json-key {
  color: #0451a5;
  font-weight: 600;
}

.json-string {
  color: #0a3069;
}

.json-number {
  color: #098658;
}

.json-boolean {
  color: #0969da;
  font-weight: 600;
}

.json-null {
  color: #656d76;
  font-style: italic;
}

/* Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 0.6s ease-in-out;
}

/* Loading States */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading .spinner-border {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .webhook-url {
    font-size: 0.8rem;
  }
  
  .event-details {
    font-size: 0.75rem;
  }
  
  .display-5 {
    font-size: 2rem;
  }
}

/* Toast Customization */
.toast {
  border: none;
  box-shadow: var(--card-shadow);
  border-radius: 15px;
}

.toast-header {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-radius: 15px 15px 0 0;
}

/* Custom Badge Styles */
.badge.bg-light {
  border: 1px solid #dee2e6;
}

/* Empty State */
#noEvents i {
  opacity: 0.3;
  margin-bottom: 1rem;
}

/* Copy Button States */
.copy-success {
  background: var(--success-gradient) !important;
  border-color: transparent !important;
  color: white !important;
}

.copy-success i:before {
  content: "\f633" !important; /* check icon */
}

/* Event Counter Animation */
#eventCount {
  transition: all 0.3s ease;
}

.event-count-updated {
  animation: pulse 0.6s ease-in-out;
  color: #28a745 !important;
}

/* Improved focus states for accessibility */
.btn:focus,
.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  border-color: #667eea;
}

/* Dark theme support (optional) */
@media (prefers-color-scheme: dark) {
  .card {
    background-color: #2d3748;
    color: #e2e8f0;
  }
  
  .event-details {
    background-color: #1a202c;
    color: #e2e8f0;
  }
}