/* =========================================================
   1. CẤU HÌNH CHUNG & MÀU SẮC THƯƠNG HIỆU VNUF2
   ========================================================= */
:root {
  --primary-color: #006633;     /* Xanh lá đậm VNUF */
  --primary-dark: #004d26;
  --accent-color: #f37021;      /* Cam thương hiệu VNUF */
  --accent-hover: #d95d13;
  --bg-color: #f0f4f1;          /* Xám xanh nhạt cho nền */
  --card-bg: #ffffff;
  --text-color: #2c3e50;
  --border-color: #dcdfe6;
  --danger-color: #e74c3c;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  --radius: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* =========================================================
   2. HEADER & LOGO
   ========================================================= */
.header {
  background-color: var(--primary-color);
  color: #fff;
  padding: 15px 5%;
}

.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo img {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  background: #fff;
  flex-shrink: 0;
}

.logo h1 {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
}

.logo h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #a3e6be;
}

.logo p {
  font-size: 0.8rem;
  opacity: 0.9;
}

.admin-button {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.admin-button:hover {
  background-color: #fff;
  color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* =========================================================
   3. BANNER
   ========================================================= */
.banner {
  background: linear-gradient(rgba(0, 77, 38, 0.85), rgba(0, 102, 51, 0.85)), url('images1/banner.jpg') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 60px 20px 80px 20px;
}

.banner-overlay h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #ffffff;
}

.banner-overlay h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffc107;
  margin-bottom: 10px;
}

.banner-overlay p {
  font-size: 1rem;
  margin-bottom: 25px;
  opacity: 0.95;
}

.banner-overlay a {
  display: inline-block;
  background-color: var(--accent-color);
  color: #fff;
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.banner-overlay a:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

/* =========================================================
   4. LAYOUT FORM KHỐI ĐỨNG DỌC (CỐ ĐỊNH CHUẨN ĐẸP)
   ========================================================= */
.container {
  max-width: 900px;
  margin: -40px auto 40px auto;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

#admissionForm {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary-color);
}

.card h2 {
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 10px;
}

/* GRID CHO CÁC Ô NHẬP LIỆU */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.score {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #444;
}

.card input, 
.card select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.25s ease;
  background-color: #fafafa;
}

.card input:focus, 
.card select:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 102, 51, 0.15);
}

/* =========================================================
   5. BÁO LỖI VIỀN ĐỎ & NÚT BẤM
   ========================================================= */
.input-error {
  border-color: var(--danger-color) !important;
  background-color: #fff5f5 !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

#btnKiemTra {
  width: 100%;
  background-color: var(--accent-color);
  color: #fff;
  border: none;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

#btnKiemTra:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(243, 112, 33, 0.3);
}

/* KẾT QUẢ XÉT TUYỂN */
.result-box {
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  font-size: 1rem;
}

.result-box.success {
  background-color: #eafaf1;
  border: 1px solid #2ecc71;
  color: #1e7e34;
}

.result-box.fail {
  background-color: #fdf2f2;
  border: 1px solid #e74c3c;
  color: #c0392b;
}

.result-box i {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* =========================================================
   6. FOOTER & RESPONSIVE
   ========================================================= */
.footer {
  background-color: var(--primary-dark);
  color: #fff;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .grid, .score {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .container {
    margin-top: -20px;
    padding: 0 15px;
  }

  .card {
    padding: 20px;
  }
  
  .top-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .logo {
    flex-direction: column;
  }

  .banner-overlay h1 {
    font-size: 1.6rem;
  }
}