/* ===== RESET & GLOBAL ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: auto;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  overflow-y: auto; /* allow scroll when content overflows */
  -webkit-overflow-scrolling: touch; /* smooth mobile scrolling */
}
body { overflow-x: hidden; }

/* ===== BACKGROUND & OVERLAY ===== */
.bg, .overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none; /* prevents blocking scroll on mobile */
}

.bg {
  background: url('https://images.unsplash.com/photo-1600891964599-f61ba0e24092?auto=format&fit=crop&w=1920&q=80')
              center/cover no-repeat fixed;
  transform: translateZ(0);
}
.overlay {
  background: rgba(0,0,0,0.55);
  z-index: 1;
}

/* ===== WRAPPER (for card-style pages) ===== */
.wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 140px 20px 60px;
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: auto; /* grows dynamically with content */
}

/* ===== CARD CONTAINERS ===== */
.card {
  background: rgba(255,255,255,0.98);
  padding: 36px;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
  max-width: 420px;
  width: 100%;
  animation: popIn 0.35s ease both;
  text-align: center;
}
.card img.logo { width: 120px; display: block; margin: 0 auto 18px; }
.card h2 { color: #D62828; margin-bottom: 20px; }

/* ===== MESSAGES ===== */
.message { text-align: center; margin-bottom: 15px; font-size: 1rem; }
.success { color: #1a7f37; }
.error { color: #c23535; }

/* ===== FORMS ===== */
form { margin-top: 10px; text-align: left; }
label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #333;
}
input, select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
}
input[type="file"] { padding: 4px; }
img.preview {
  max-width: 140px;
  border-radius: 6px;
  margin-top: 8px;
}

/* ===== BUTTONS ===== */
button, .btn-link {
  display: inline-block;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s;
}
button {
  width: 100%;
  margin-top: 15px;
  background: linear-gradient(90deg, #D62828, #FF4B2B);
  color: #fff;
  box-shadow: 0 8px 20px rgba(214,40,40,0.18);
}
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 35px rgba(0,0,0,0.18);
}

/* ===== UNIVERSAL OUTLINE BUTTON SYSTEM ===== */
button, .btn, .home-btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.25s ease;
  border: 2px solid currentColor;
  background: transparent;
  user-select: none;
}

.btn-light, .btn-outline-light, .home-btn {
  color: #fff;
}
.btn-light:hover, .btn-outline-light:hover, .home-btn:hover {
  color: #e6e6e6;
  border-color: #e6e6e6;
  transform: translateY(-2px);
  background: rgba(255,255,255,0.1);
}

.btn-dark, .btn-outline-dark, button, input[type=submit] {
  color: #111;
}
.btn-dark:hover, .btn-outline-dark:hover, button:hover, input[type=submit]:hover {
  color: #444;
  border-color: #444;
  transform: translateY(-2px);
  background: rgba(0,0,0,0.05);
}
.btn-block, button { width: 100%; }

/* ===== LINKS ===== */
.card p {
  margin-top: 14px;
  font-size: 0.92rem;
  color: #444;
  text-align: center;
}
.card a {
  color: #D62828;
  font-weight: 700;
  text-decoration: none;
  transition: color .2s ease;
}
.card a:hover { color: #8B0000; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 80px;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  z-index: 1000;
}
.navbar .logo { height: 40px; }
.navbar ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.navbar ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color .2s ease;
}
.navbar ul li a:hover { color: #ffcc00; }

/* ===== HERO / LANDING PAGE ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  z-index: 2;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: -1;
}
.hero .content {
  max-width: 600px;
  padding: 0 20px;
}
.hero .content h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.hero .content p {
  font-size: 1.1rem;
  margin-bottom: 24px;
  color: #eee;
}
.hero .buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.hero .buttons a {
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 1rem;
  border: 2px solid #fff;
  color: #fff;
  background: transparent;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.hero .buttons a.primary {
  background: #fff;
  color: #333;
  border-color: #fff;
}
.hero .buttons a.primary:hover {
  background: #f0f0f0;
  color: #000;
}
.hero .buttons a.outline:hover {
  background: rgba(255,255,255,0.2);
}
/* ===== FLOATING LOGOUT BUTTON ===== */
.logout-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(90deg,#D62828,#FF4B2B);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  z-index: 1000;
}
.logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
/* ===== FLOATING HOME BUTTON ===== */
.home-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1001;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.95rem;
  border: 2px solid #fff;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(3px);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}
.home-btn:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ===== MOBILE FIX: ensure visible home button and scroll ===== */
@media (max-width: 600px) {
  .home-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 8px 18px;
    font-size: 0.9rem;
    border-width: 1.5px;
    z-index: 10000;
  }
  html, body {
    overflow-y: auto;
  }
}

/* ===== SCROLLBAR (optional aesthetic) ===== */
body::-webkit-scrollbar {
  width: 10px;
}
body::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.4);
  border-radius: 6px;
}
body::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.6);
}

/* ===== ANIMATIONS ===== */
@keyframes popIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .hero .content h1 { font-size: 2rem; }
  .hero .content p { font-size: 1rem; }
  .card { padding: 28px 20px; }
}

/* === Logo styling and animation === */
.logo {
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

/* 🔴 Soft lift and red glow on hover */
.logo:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 20px rgba(214, 40, 40, 0.4);
  cursor: pointer;
}
