/**
 * 登入頁面樣式
 */

.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    position: relative;
}

.login-box {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.login-header p {
    color: #999;
    font-size: 14px;
    margin: 0;
}

.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check-input {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.form-check-label {
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.form-error {
    color: #f44336;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-error.show {
    display: block;
}

.alert {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
}

.btn-primary {
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover:not(:disabled) {
    background-color: #5568d3;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-footer p {
    color: #999;
    font-size: 12px;
    margin: 0;
}

.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.language-selector .form-control {
    width: 150px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
}

.language-selector .form-control option {
    background-color: white;
    color: #333;
}

.language-selector .form-control:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* 響應式設計 */
@media (max-width: 576px) {
    .login-container {
        max-width: 100%;
    }

    .login-box {
        padding: 30px 20px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .language-selector {
        position: static;
        margin-top: 20px;
        text-align: center;
    }

    .language-selector .form-control {
        width: 100%;
    }
}

/* 載入中動畫 */
.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
