/* index.css - Login Page */

/* Global Styles */
* { box-sizing: border-box; }
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background: linear-gradient(-45deg, #1f4b63, #2f6d85, #5a8ca3, #4a7a93);
    background-size: 600% 600%;
    animation: gradientBG 25s ease infinite;
    color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
@keyframes gradientBG {
    0% { background-position: 0% 50% }
    50% { background-position: 100% 50% }
    100% { background-position: 0% 50% }
}

/* ===========================================================
   ======================= Header ============================
   =========================================================== */

header {
  width: 90%;
  max-width: 1200px;
  margin: 10px auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 15px;
  background: rgba(44, 62, 80, 0.9);
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  min-height: 150px;
  position: relative;
}

.header-left { display: flex; flex-direction: column; align-items: flex-start; }

h1.page-title {
  font-size: 3.2rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
  margin-bottom: 8px;
}

#headbtns { display: flex; gap: 12px; flex-wrap: wrap; }

.logoutbtn, .homebtn, .backbtn {
  padding: 10px 18px;
  font-size: 20px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  transition: transform .2s, box-shadow .2s, opacity .15s;
}

.logoutbtn { background: linear-gradient(145deg, #e74c3c, #f05b4f); }
.logoutbtn:hover { transform: translateY(-2px); }

.homebtn { background: linear-gradient(120deg, #3498db, #2980b9); }
.homebtn:hover { transform: translateY(-2px); }

.backbtn { background: linear-gradient(120deg, #2ecc71, #27ae60); }
.backbtn:hover { transform: translateY(-2px); }

.header-right { display: flex; align-items: flex-start; }
.header-right img { height: 100%; max-height: 150px; border-radius: 6px; }

/* ===========================================================
   ==================== Container / Footer ===================
   =========================================================== */

.container { max-width: 1200px; margin: 20px auto; padding: 0 15px; }

footer {
  text-align: center;
  font-size: 14px;
  color: #fff;
  margin: 30px 0;
  opacity: 0;
  animation: fadeSlideFooter 1.2s forwards .6s;
}
@keyframes fadeSlideFooter { to { opacity: 1; transform: translateY(0); } }

/* Login Card */
.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.login-card {
    background: rgba(52, 152, 219, 0.85);
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.6);
    max-width: 400px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(6px);
}
.login-card h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 3rem;
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
}
.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 6px;
    border: none;
    font-size: 1rem;
    background: rgba(255,255,255,0.9);
    color: #333;
}
.login-card button {
    margin-top: 15px;
    width: 100%;
    padding: 12px;
    font-size: 1.2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: linear-gradient(145deg, #1abc9c, #16a085);
    color: #fff;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.login-card button:hover {
    background: linear-gradient(145deg, #16a085, #1abc9c);
    transform: translateY(-2px);
}

/* Login Error */
.login-error {
    background: rgba(231, 76, 60, 0.9);
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    text-align: center;
}

/* Mobile Adjustments */
@media(max-width:480px) {
    header {
        flex-direction: column; /* vertical stack */
        align-items: center;
        justify-content: center;
        min-height: auto;
        padding: 20px 15px;
        text-align: center;
    }

    .header-right {
        order: 1; /* logo above */
        display: flex;
        justify-content: center;
        width: 100%;

    }

    .header-left {
        order: 2; /* title below */
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 0;
    }

    .page-title {
        font-size: 2.2rem;
    }

    .header-right img {
        height: 80px;
        max-height: 80px;
    }

    .login-card {
        width: 95%;
        margin: 0px auto;
        padding: 25px 20px;
        margin-top: -5px;
    }

    .login-card input,
    .login-card button {
        font-size: 1.2rem;
        padding: 14px;
    }

    .login-card h2 {
        font-size: 2rem;
    }

    .login-error {
        font-size: 1rem;
        padding: 10px 14px;
    }
    footer {
    text-align: center;
    font-size: 12px;
    color: white;
    margin: 10px 0;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideFooter 1.5s forwards 0.8s;
    margin-top: -5px;
    }
    @keyframes fadeSlideFooter {
    to { opacity: 1; transform: translateY(0); }
    }
}
