/* =====================
   VoteEase Global Theme
====================== */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f6f8;
  margin: 0;
  padding: 0;
}

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

header {
  background-color: #003366;
  color: white;
  padding: 20px 0;
  text-align: center;
}

h1 {
  font-size: 3em;
  margin: 0;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeSlideIn 1.5s ease-out forwards;
}

@keyframes fadeSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  text-align: center;
  padding: 60px 20px;
}

footer {
  background-color: #003366;
  color: white;
  padding: 20px 0;
  text-align: center;
  margin-top: 95px;
}

/* Buttons */
.btn {
  display: inline-block;
  margin: 10px;
  padding: 12px 24px;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-register {
  background-color: #0066cc;
}

.btn-register:hover {
  background-color: #004a99;
}

.btn-login {
  background-color: #28a745;
}

.btn-login:hover {
  background-color: #1e7e34;
}

/* Form & Card */
.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 30px;
  margin-top: 40px;
  text-align: left;
}

label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 6px;
  margin-top: 0px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.checkbox-group {
  margin: 10px 0;
}

.btn {
  background-color: #0066cc;
}

.btn:hover {
  background-color: #004a99;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* --- Fix footer gap for login page only --- */
#login-section {
  min-height: calc(100vh - 510px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ================================
   Floating Alerts (like Admin UI)
================================ */
.alert-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1050;
  min-width: 300px;
}

.alert {
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 12px 18px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  animation: slideIn 0.3s ease-out;
}

.alert-success {
  background-color: #d1e7dd;
  color: #0f5132;
  border-left: 5px solid #198754;
}

.alert-danger {
  background-color: #f8d7da;
  color: #842029;
  border-left: 5px solid #dc3545;
}

.alert .btn-close {
  background: transparent;
  border: none;
  float: right;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

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

/* Floating alert container (top-right corner) */
.alert-container {
  position: fixed;         /* Make it float */
  top: 20px;               /* Distance from top */
  right: 20px;             /* Distance from right */
  z-index: 2000;           /* Above other elements */
  width: auto;
  max-width: 400px;        /* Limit width for cleaner look */
}

/* Optional: space between multiple alerts */
.alert-container .alert {
  margin-bottom: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}