﻿/* 背景圖設定 */
body::before {
    content: "";
    background: url('/Images/login_background.jpg') no-repeat center center fixed;
    background-size: cover;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 0;
}

.login-logo {
    position: fixed; /* 固定位置 */
    top: 20px;
    left: 20px;
    z-index: 999; /* 確保蓋在背景圖上面 */
}

    .login-logo img {
        height: 60px;
        object-fit: contain;
    }

/* 登入容器 */
.login-container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

/* 動畫 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 標題群組 */
.admin-header-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.admin-header {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    animation: headerSlideIn 0.6s ease-out forwards;
    opacity: 0;
}

    .admin-header:hover {
        animation: headerFloat 1.2s ease-in-out infinite alternate;
    }

.admin-subtitle {
    font-size: 18px;
    font-family: 'Dancing Script', cursive;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    margin-top: -10px;
}

/* 輸入框樣式 */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: all 0.3s ease;
    outline: none;
    background-color: #f9f9f9;
    box-sizing: border-box;
}

    .form-control:focus {
        border-color: #007bff;
        box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
        background-color: #fff;
    }

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-bottom: 5px;
    display: block;
}

/* 標題動畫 */
@keyframes headerSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes headerFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}
/* 歡迎文字獨立一塊 */
.welcome-box {
    background-color: transparent; /* 改成透明背景 */
    border-radius: 15px;
    padding: 25px 30px;
    box-shadow: none; /* 去掉陰影 */
    margin-bottom: 20px;
    text-align: center;
    max-width: 90%;
    width: 400px;
}
/* 標題群組 */
.admin-header-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

/* 使這兩個元素的動畫同時進行 */
.admin-header,
.admin-subtitle {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.admin-header {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.admin-subtitle {
    font-size: 18px;
    font-family: 'Dancing Script', cursive;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-top: 10px; /* 控制兩者之間的距離 */
}

/* 合併的動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* 登入按鈕樣式 */
button[type="submit"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease; /* 加入過渡效果 */
    outline: none;
}

    /* 滑鼠懸停時的反應 */
    button[type="submit"]:hover {
        background-color: #0056b3; /* 懸停時改變背景色 */
        border-color: #004085; /* 改變邊框顏色 */
        box-shadow: 0 0 8px rgba(0, 123, 255, 0.5); /* 加入陰影效果 */
    }
/* 驗證碼 */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .captcha-container img {
        height: 50px;
        width: auto;
    }

    .captcha-container button {
        padding: 5px 10px;
        font-size: 14px;
        background-color: #007bff;
        color: #fff;
        border: none;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

        .captcha-container button:hover {
            background-color: #0056b3;
        }
