/* Modern CSS Reset and Base Styles */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f5f7fb;
  color: #102a43;
  line-height: 1.6;
}

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

/* Page Header */
header {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #dbe5ef;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  padding: 28px 32px;
  margin-bottom: 32px;
}

header h1 {
  margin: 0 0 16px 0;
  font-size: 2.5rem;
  font-weight: 700;
  color: #102a43;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid #dbe5ef;
  background: #f8fafc;
  color: #2f66a1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

nav a:hover {
  background: #eef4fb;
  transform: translateY(-1px);
}

nav a[href*="login"],
nav a[href*="register"] {
  background: #2f66a1;
  color: #ffffff;
  border-color: #2f66a1;
  box-shadow: 0 8px 24px rgba(47, 102, 161, 0.18);
}

nav a[href*="logout"] {
  background: #ff6b6b;
  color: #ffffff;
  border-color: #ff6b6b;
  box-shadow: 0 8px 24px rgba(255, 107, 107, 0.18);
}

nav a[href*="admin"] {
  background: #ffcb47;
  color: #1f2937;
  border-color: #f2c94c;
  box-shadow: 0 8px 24px rgba(255, 203, 71, 0.18);
}

nav a:not([href*="login"]):not([href*="register"]):not([href*="logout"]):not([href*="admin"]) {
  background: #ffffff;
  color: #2f66a1;
}

nav a:not([href*="login"]):not([href*="register"]):not([href*="logout"]):not([href*="admin"]):hover {
  background: #eef4fb;
}

/* Modern Cards */
.card,
.stat-card,
.safe-confirmation,
.result-details,
.admin-nav {
  background: #ffffff;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e6e8ed;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  padding: 30px;
  margin-bottom: 32px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.1);
}

.card h2 {
  margin-top: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #102a43;
}

.card h3 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #334e68;
}

/* Modern Forms */
.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #334e68;
  font-size: 0.95rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.25s ease;
  background: #ffffff;
  color: #102a43;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2f66a1;
  box-shadow: 0 0 0 4px rgba(47, 102, 161, 0.08);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* Modern Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: #2f66a1;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(47, 102, 161, 0.18);
}

.btn-secondary {
  background: #ffffff;
  color: #2f66a1;
  border: 1px solid #dbe5ef;
}

.btn-secondary:hover {
  background: #eef4fb;
}

.btn-danger {
  background: #ff6b6b;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.18);
}

.btn-success {
  background: #38a169;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(56, 161, 105, 0.18);
}

/* Modern Flash Messages */
.flash {
  padding: 20px 24px;
  border-radius: 14px;
  margin-bottom: 24px;
  border-left: 4px solid;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.flash.success {
  background: #e6fffa;
  color: #0b5345;
  border-left-color: #38a169;
}

.flash.danger {
  background: #ffe6e6;
  color: #742a2a;
  border-left-color: #ff6b6b;
}

.flash.warning {
  background: #fff4d6;
  color: #744210;
  border-left-color: #f59e0b;
}

.flash.info {
  background: #e8f4ff;
  color: #2f4f76;
  border-left-color: #2f66a1;
}

/* Modern Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.table th,
.table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid #e6e8ed;
}

.table thead {
  background: #f0f4f9;
  color: #102a43;
}

.table tbody tr:nth-child(even) {
  background: #fbfcff;
}

.table tbody tr:hover {
  background: #eef4fb;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table-responsive {
  overflow-x: auto;
  margin: 24px 0;
}

/* Modern Dashboard Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e6e8ed;
  padding: 24px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #2f66a1;
}

.stat-label {
  font-size: 1rem;
  color: #334e68;
  font-weight: 600;
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f8fafc;
  color: #102a43;
}

.status-pill.pending {
  background: #f2f6ff;
  color: #1d4ed8;
}

.status-pill.phishing {
  background: #fff1f2;
  color: #991b1b;
}

.status-pill.safe {
  background: #ecfdf5;
  color: #047857;
}

.status-pill.unknown {
  background: #f8fafc;
  color: #334e68;
}

.status-pill.removed {
  background: #fdf2f8;
  color: #9d174d;
}

/* Safe Confirmation */
.safe-confirmation {
  text-align: center;
  padding: 28px;
  border-radius: 16px;
  border: 1px solid #e6e8ed;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.safe-icon {
  font-size: 4rem;
  color: #38a169;
  margin-bottom: 16px;
}

.safe-confirmation h3 {
  color: #102a43;
  margin-bottom: 16px;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.metric {
  background: #f8fafc;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.metric-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: #102a43;
  margin-bottom: 6px;
}

.metric-label {
  font-size: 0.95rem;
  color: #334e68;
  font-weight: 600;
}

/* Result Details */
.result-details {
  margin: 24px 0;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

/* Admin Navigation */
.admin-nav {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }

  header {
    padding: 24px 22px;
  }

  header h1 {
    font-size: 2rem;
  }

  nav {
    gap: 10px;
  }

  nav a {
    padding: 10px 16px;
  }

  .card {
    padding: 24px;
  }

  .table th,
  .table td {
    padding: 14px 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
