/* Enhanced Modern CSS for CyberBoostX */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --danger-gradient: linear-gradient(135deg, #fc466b 0%, #3f5efb 100%);
  --dark-bg: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text-primary: #2c3e50;
  --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--dark-bg);
  background-attachment: fixed;
  direction: rtl;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

/* Animated Background Particles */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  z-index: -1;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(1deg); }
  66% { transform: translateY(10px) rotate(-1deg); }
}

/* Container Enhancements */
.container {
  position: relative;
  z-index: 1;
}

/* Glass Morphism Cards */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
}

.card:hover::before {
  opacity: 1;
}

.card-body {
  padding: 2rem;
  color: white;
}

/* Enhanced Headers */
h2, h4 {
  background: linear-gradient(45deg, #fff, #e0e0e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
}

/* Form Enhancements */
.form-control {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  color: white;
  font-size: 1.1rem;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: #667eea;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
  color: white;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* Modern Buttons */
.btn {
  border-radius: 15px;
  font-weight: 600;
  padding: 1rem 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: var(--primary-gradient);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Pulse Animation for Scan Button */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
  100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

.btn-primary:active {
  animation: pulse 1.5s infinite;
}

/* Result Status Cards */
.result-status {
  padding: 2rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.result-status::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.status-safe {
  background: var(--success-gradient);
}

.status-warning {
  background: var(--warning-gradient);
}

.status-danger {
  background: var(--danger-gradient);
}

.result-status h4 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 2;
}

.result-status .score {
  font-size: 1.2rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

/* Enhanced Tables */
.table-responsive {
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.table {
  margin: 0;
  color: white;
}

.table th {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  padding: 1rem;
}

.table td {
  border-color: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
  background: rgba(255, 255, 255, 0.03);
}

.table-hover tbody tr:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.01);
  transition: all 0.2s ease;
}

/* Info Cards for IP Details */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.info-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
}

.info-card i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #667eea;
}

.info-card h5 {
  color: #e0e0e0;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.info-card p {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

/* Flag Enhancements */
.country-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.flag-icon {
  width: 48px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.country-text {
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
}

/* Progress Bars for Scores */
.score-progress {
  margin: 1rem 0;
}

.progress {
  height: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.progress-bar {
  border-radius: 10px;
  transition: width 1s ease-in-out;
}

/* Alert Enhancements */
.alert {
  border-radius: 15px;
  border: none;
  backdrop-filter: blur(10px);
  color: white;
  font-weight: 500;
}

.alert-warning {
  background: rgba(255, 193, 7, 0.2);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Links */
.link-primary {
  color: #87CEEB;
  text-decoration: none;
  font-weight: 500;
  transitions: all 0.3s ease;
}

.link-primary:hover {
  color: #98D8E8;
  text-shadow: 0 0 10px rgba(135, 206, 235, 0.5);
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .card-body {
    padding: 1.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .country-info {
    flex-direction: column;
    text-align: center;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}