/* 登錄頁面樣式 */

/* 登錄容器 */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--accent-color);
}

/* 頭部區域 */
.login-header {
    background: var(--accent-color);
    /* border-bottom: 1px solid #e5e5e5; */
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* 返回按鈕 */
.back-button-container {
    position: absolute;
    left: 20px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-gold);
    color: var(--primary-gold);
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(255, 207, 112, 0.2);
}

.back-button svg {
    transition: transform 0.3s ease;
}

.back-button:hover svg {
    transform: translateX(-2px);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.logo-image {
    width: 200px;
    height: auto;
    object-fit: cover;
}

/* 主要登錄區域 */
.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    min-height: calc(100vh - 200px);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.login-form-container {
    /* background: #ffffff; */
    border-radius: 16px;
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); */
    padding: 50px;
    width: 100%;
    max-width: 500px;
    position: relative;
    overflow: hidden;
    margin-left: auto;
    margin-right: 60px;

    /* background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 40px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px); */
}

/* .login-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffcf70 0%, #ffb845 100%);
} */

/* 左側圖片區域 */
.login-image-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.login-image-container {
    width: 100%;
    max-width: 600px;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(255, 207, 112, 0.2);
    position: relative;
}

.login-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.login-image:hover {
    transform: scale(1.05);
}

.login-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 207, 112, 0.1) 0%, rgba(255, 184, 69, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-image-container:hover .login-image-overlay {
    opacity: 1;
}

/* 登錄標題區域 */
.login-header-section {
    text-align: center;
    margin-bottom: 32px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    letter-spacing: 0.5px;
}

.login-subtitle {
    font-size: 16px;
    color: #f6f6f6;
    margin: 0;
    line-height: 1.5;
}

/* 表單樣式 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layui-form-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.layui-input-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-left: 0;
}

.layui-form-item .layui-form-checkbox {
    margin-top: 0 !important;
}

.layui-form-checkbox div {
    color: #ffffff !important;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.layui-form-label {
    color: #ffffff;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 0;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #999999;
    z-index: 2;
    top: 14px;
}

.form-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    color: #333333;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #ffcf70;
    box-shadow: 0 0 0 3px rgba(255, 207, 112, 0.1);
}

.form-input::placeholder {
    color: #999999;
}

.password-toggle {
    position: absolute;
    top: 11px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    color: #999999;
}

.password-toggle:hover {
    color: #ffcf70;
    background: rgba(255, 207, 112, 0.1);
}

.eye-icon {
    transition: all 0.3s ease;
}

/* 表單選項 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #e5e5e5;
    border-radius: 4px;
    background: #ffffff;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked+.checkbox-custom {
    background: #ffcf70;
    border-color: #ffcf70;
}

.checkbox-wrapper input[type="checkbox"]:checked+.checkbox-custom::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #1a1a1a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
}

.forgot-password {
    font-size: 14px;
    color: #ffcf70;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-gold);
    text-decoration: none;
    transform: translateY(-1px);
    text-shadow: 0 2px 4px rgba(255, 207, 112, 0.3);
    transition: all 0.3s ease;
}

/* 登錄按鈕 */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #ffcf70 0%, #ffb845 100%);
    color: #ffffff;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-left: 0;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 207, 112, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 0;
}

.loading-spinner {
    margin-left: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 註冊鏈接 */
.signup-link {
    text-align: center;
    font-size: 14px;
    color: #f6f6f6;
}

.signup-text {
    color: #ffcf70;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: all 0.3s ease;
}

.signup-text:hover {
    color: #ffb845;
    text-decoration: underline;
}

/* 底部區域 */
.login-footer {
    background: var(--accent-color);
    /* border-top: 1px solid #e5e5e5; */
    padding: 20px 0;
}

.footer-content {
    max-width: 400px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-text {
    font-size: 12px;
    color: #999999;
    margin: 0;
}

/* 響應式設計 */
@media (max-width: 1200px) {
    .login-main {
        flex-direction: column;
        gap: 40px;
        padding: 40px 20px;
    }
    
    .login-image-section {
        order: 2;
        padding: 0;
        width: 100%;
    }
    
    .login-image-container {
        max-width: 400px;
        height: 300px;
    }
    
    .login-form-container {
        order: 1;
        margin: 0 auto;
        max-width: 450px;
    }

    .layui-btn.submit-btn {
        font-size: 16px;
        line-height: 28px;
    }
}

@media (max-width: 768px) {
    .login-main {
        padding: 20px;
    }
    
    .login-form-container {
        padding: 0;
        margin: 0;
        max-width: 100%;
    }
    
    .login-image-container {
        max-width: 100%;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .login-form-container {
        margin: 20px;
    }

    .login-title {
        font-size: 24px;
    }

    .login-subtitle {
        font-size: 14px;
    }

    .form-input {
        padding: 14px 14px 14px 44px;
        font-size: 16px;
    }

    .input-icon {
        left: 14px;
    }

    .password-toggle {
        right: 14px;
    }

    .login-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .login-image-container {
        height: 200px;
    }
}

/* 錯誤狀態 */
.form-input.error {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.error-message {
    font-size: 12px;
    color: #ff6b6b;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.error-message::before {
    content: '⚠';
    font-size: 14px;
}

/* 成功狀態 */
.form-input.success {
    border-color: #51cf66;
    box-shadow: 0 0 0 3px rgba(81, 207, 102, 0.1);
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.login-form-container {
    animation: fadeInUp 0.6s ease-out;
}

.form-group {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.form-group:nth-child(4) {
    animation-delay: 0.4s;
}

.layui-input,
.layui-select,
.layui-textarea {
    width: 100%;
    padding: 0 46px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--family-font);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-sizing: border-box;
    line-height: 48px;
}

.layui-input:focus,
.layui-select:focus,
.layui-textarea:focus {
    outline: none;
    border-color: var(--primary-gold) !important;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(255, 207, 112, 0.2);
}

.layui-input::placeholder,
.layui-textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.layui-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.layui-textarea {
    resize: vertical;
    min-height: 120px;
    height: auto;
    line-height: 1.6;
    padding: 16px;
}

.layui-btn.submit-btn {
    width: 100%;
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--gold-dark) 100%);
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--family-font);
    box-shadow: 0 4px 12px rgba(255, 207, 112, 0.3);
}

/* 自定義彈框樣式 */
.layui-layer.custom-success-layer {
    background: rgba(0, 0, 0, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(10px) !important;
}

.layui-layer.custom-success-layer .layui-layer-content {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center !important;
    padding: 20px !important;
    background: transparent !important;
}

.layui-layer.custom-success-layer .layui-layer-icon {
    color: #4caf50 !important;
    font-size: 24px !important;
}

.layui-layer.custom-error-layer {
    background: rgba(0, 0, 0, 0.9) !important;
    border: 1px solid rgba(255, 107, 107, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(10px) !important;
}

.layui-layer.custom-error-layer .layui-layer-content {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center !important;
    padding: 20px !important;
    background: transparent !important;
}

.layui-layer.custom-error-layer .layui-layer-icon {
    color: #ff6b6b !important;
    font-size: 24px !important;
}

/* 彈框動畫效果 */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.layui-layer.custom-success-layer {
    animation: slideInDown 0.3s ease-out;
}

.layui-layer.custom-error-layer {
    animation: shake 0.5s ease-in-out;
}

.custom-success-layer .layui-layer-content .layui-layer-face {
    top: 22px;
    left: 40px;
}