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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f8f9fa;
  min-height: 100vh;
  padding: 20px;
  color: #2c3e50;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 30px;
  padding: 20px 0;
  border-bottom: 2px solid #e9ecef;
}

h1 { 
  font-size: 2.2em; 
  margin-bottom: 10px; 
  font-weight: 600;
  color: #1a252f;
}

header p {
  color: #6c757d;
  font-size: 1.1em;
}

.search-box {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 30px;
  border: 1px solid #e9ecef;
}

.input-group {
  display: flex;
  gap: 15px;
  position: relative;
}

.input-alert {
  position: absolute;
  top: -5px;
  left: 0;
  right: 0;
  z-index: 10;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  animation: slideIn 0.3s ease-out;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

input, textarea {
  flex: 1;
  padding: 15px;
  font-size: 14px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #495057;
}

button {
  padding: 15px 30px;
  font-size: 14px;
  background: #495057;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
}

button:hover {
  background: #343a40;
}

button:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.loading {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border: 1px solid #e9ecef;
}

.error {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 6px;
  margin: 20px 0;
  border: 1px solid #f5c6cb;
}

.results {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 30px;
  border: 1px solid #e9ecef;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.card h3 {
  margin-bottom: 15px;
  color: #1a252f;
  font-size: 1.1em;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
  border-bottom: none;
}

.label {
  font-weight: 500;
  color: #495057;
}

.value {
  font-weight: 600;
  color: #2c3e50;
}

.risk-indicator {
  padding: 20px;
  margin: 20px 0;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  font-size: 1.1em;
  border: 2px solid;
}

.risk-low { 
  background: #d1ecf1; 
  color: #0c5460; 
  border-color: #bee5eb;
}

.risk-medium { 
  background: #fff3cd; 
  color: #856404; 
  border-color: #ffeaa7;
}

.risk-high { 
  background: #f8d7da; 
  color: #721c24; 
  border-color: #f5c6cb;
}

.risk-reserved {
  background: #e2e3e5;
  color: #383d41;
  border-color: #d6d8db;
}

.reserved-info {
  background: #fff3cd;
  padding: 20px;
  border-radius: 6px;
  margin: 15px 0;
  border: 1px solid #ffeaa7;
}

.reserved-info h3 {
  color: #856404;
  margin-bottom: 10px;
}

.reserved-info p {
  margin: 8px 0;
  color: #856404;
}

.ip-result.reserved {
  background: #f8f9fa;
  border: 2px solid #6c757d;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: #d4edda;
  color: #155724;
}

.badge-danger {
  background: #f8d7da;
  color: #721c24;
}

.badge-warning {
  background: #fff3cd;
  color: #856404;
}

.ip-result {
  margin: 30px 0;
  padding: 25px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: white;
}

.ip-result.blocked {
  background: #fff5f5;
  border: 2px solid #e53e3e;
}

.blocking-buttons {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.blocking-buttons button {
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.blocking-buttons button:hover {
  background: #c82333;
}

.auto-blocked {
  background: #fff3cd;
  color: #856404;
  padding: 15px;
  border-radius: 6px;
  margin: 15px 0;
  font-weight: 500;
  border: 1px solid #ffeaa7;
}

.blocked-item {
  background: #f8f9fa;
  padding: 20px;
  margin: 15px 0;
  border-radius: 6px;
  border-left: 4px solid #dc3545;
  border: 1px solid #e9ecef;
}

.blocked-list {
  max-height: 400px;
  overflow-y: auto;
}

.aws-format {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid #e9ecef;
  margin: 20px 0;
}

.aws-format textarea {
  background: white;
  border: 1px solid #ced4da;
  padding: 15px;
  font-family: 'Courier New', monospace;
}

.blocked-controls {
  text-align: center;
  margin-bottom: 25px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #e9ecef;
}

.metric-row:last-child {
  border-bottom: none;
}

.metric-row .label {
  font-weight: 500;
  color: #495057;
}

.metric-row .value {
  font-weight: 600;
  color: #2c3e50;
}
