/**
 * 登录页面样式 - 两栏式红金版
 * 清晰底纹 + 红金主色调 + 靓丽明亮
 */

/* ========== 基础重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 30%, #8B0000 60%, #B22222 100%);
}

/* ========== 登录容器 ========== */
.login-container {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========== 背景底纹层 ========== */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/ginseng.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: 1;
}

/* ========== 渐变遮罩层 ========== */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(220, 20, 60, 0.2) 0%, transparent 50%),
        radial-gradient(circle at center, rgba(255, 215, 0, 0.15) 0%, transparent 60%),
        linear-gradient(135deg, rgba(139, 0, 0, 0.3) 0%, rgba(220, 20, 60, 0.25) 100%);
    z-index: 2;
}

/* ========== 光效装饰层 ========== */
.light-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

/* 主光斑 */
.light-main {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    animation: lightPulse 6s ease-in-out infinite;
}

@keyframes lightPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1.1);
    }
}

/* 侧边光效 */
.light-side-1 {
    position: absolute;
    top: 30%;
    left: -5%;
    width: 40%;
    height: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 165, 0, 0.3) 0%, transparent 70%);
    animation: lightFloat 8s ease-in-out infinite;
}

.light-side-2 {
    position: absolute;
    bottom: 30%;
    right: -5%;
    width: 40%;
    height: 50%;
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.25) 0%, transparent 70%);
    animation: lightFloat 10s ease-in-out infinite reverse;
}

@keyframes lightFloat {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(10%, 10%);
    }
}

/* ========== 登录卡片（两栏式） ========== */
.login-card {
    position: relative;
    z-index: 10;
    display: flex;
    background: linear-gradient(135deg,
        rgba(139, 0, 0, 0.85) 0%,
        rgba(220, 20, 60, 0.75) 50%,
        rgba(139, 0, 0, 0.85) 100%);
    backdrop-filter: blur(60px);
    -webkit-backdrop-filter: blur(60px);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 30px 60px rgba(139, 0, 0, 0.5),
        0 0 150px rgba(255, 215, 0, 0.3),
        0 0 80px rgba(220, 20, 60, 0.3),
        inset 0 2px 0 rgba(255, 215, 0, 0.4),
        inset 0 -2px 0 rgba(255, 215, 0, 0.2);
    animation: cardEntry 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 900px;
    width: 90%;
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========== 左栏：品牌展示 ========== */
.brand-section {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg,
        rgba(139, 0, 0, 0.3) 0%,
        rgba(220, 20, 60, 0.2) 100%);
    border-right: 1px solid rgba(255, 215, 0, 0.3);
    min-width: 400px;
}

/* ========== 右栏：登录表单 ========== */
.form-section {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 400px;
}

/* ========== Logo ========== */
.logo-container {
    margin-bottom: 35px;
}

.logo-image {
    height: 120px;
    width: auto;
    display: block;
    filter:
        drop-shadow(0 10px 20px rgba(139, 0, 0, 0.3))
        drop-shadow(0 0 40px rgba(255, 215, 0, 0.6));
    transition: transform 0.5s ease;
    animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.logo-image:hover {
    transform: scale(1.08);
}

/* ========== 标题 ========== */
.main-title {
    font-size: 56px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: 8px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF6347 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.7));
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.7));
    }
    50% {
        filter: drop-shadow(0 0 60px rgba(255, 215, 0, 1));
    }
}

.sub-title {
    font-size: 18px;
    font-weight: 400;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(139, 0, 0, 0.5);
}

/* ========== 登录表单 ========== */
.login-form {
    width: 100%;
}

/* ========== 表单项 ========== */
.form-item {
    margin-bottom: 30px;
}

.form-label {
    display: block;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(139, 0, 0, 0.5);
}

/* ========== 输入框组 ========== */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.form-field {
    width: 100%;
    padding: 18px 55px 18px 55px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 18px;
    font-size: 16px;
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.15) 0%,
        rgba(255, 165, 0, 0.1) 100%);
    color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-field::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-field:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.8);
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.25) 0%,
        rgba(255, 165, 0, 0.2) 100%);
    box-shadow:
        0 0 0 4px rgba(255, 215, 0, 0.3),
        0 15px 50px rgba(220, 20, 60, 0.4),
        inset 0 0 30px rgba(255, 215, 0, 0.1);
}

.field-icon {
    position: absolute;
    left: 22px;
    font-size: 22px;
    color: rgba(255, 215, 0, 0.8);
    pointer-events: none;
    transition: all 0.4s ease;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.7));
}

.form-field:focus ~ .field-icon {
    color: #FFD700;
    transform: scale(1.15);
    filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.9));
}

/* ========== 错误提示 ========== */
.error-box {
    background: linear-gradient(135deg,
        rgba(220, 20, 60, 0.4) 0%,
        rgba(255, 99, 71, 0.3) 100%);
    border: 2px solid rgba(255, 99, 71, 0.6);
    color: #ffffff;
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 35px;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(15px);
    box-shadow:
        0 4px 20px rgba(220, 20, 60, 0.4),
        inset 0 0 20px rgba(255, 99, 71, 0.15);
    animation: shake 0.5s ease-in-out;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.error-icon {
    font-size: 18px;
    filter: drop-shadow(0 0 10px rgba(255, 99, 71, 0.9));
}

/* ========== 登录按钮 ========== */
.submit-button {
    width: 100%;
    padding: 20px 35px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF6347 100%);
    color: #8B0000;
    border: none;
    border-radius: 18px;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow:
        0 10px 30px rgba(255, 215, 0, 0.6),
        0 0 50px rgba(255, 215, 0, 0.4),
        0 5px 15px rgba(220, 20, 60, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
    margin-top: 25px;
    position: relative;
    overflow: hidden;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow:
        0 15px 40px rgba(255, 215, 0, 0.8),
        0 0 70px rgba(255, 215, 0, 0.6),
        0 8px 20px rgba(220, 20, 60, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.submit-button:active {
    transform: translateY(-2px) scale(1.01);
}

.btn-text {
    flex: 1;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.btn-arrow {
    font-size: 22px;
    font-weight: 900;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(139, 0, 0, 0.3));
}

.submit-button:hover .btn-arrow {
    transform: translateX(10px) scale(1.15);
}

/* ========== 验证码 ========== */
.captcha-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-input {
    width: 150px;
    padding: 18px 15px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 18px;
    font-size: 16px;
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.15) 0%,
        rgba(255, 165, 0, 0.1) 100%);
    color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.captcha-input:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.8);
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.25) 0%,
        rgba(255, 165, 0, 0.2) 100%);
    box-shadow:
        0 0 0 4px rgba(255, 215, 0, 0.3),
        0 15px 50px rgba(220, 20, 60, 0.4);
}

.captcha-image {
    flex: 0 0 auto;
    width: 150px;
    height: 54px;
    border-radius: 12px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.captcha-image:hover {
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow:
        0 0 15px rgba(255, 215, 0, 0.4),
        0 2px 12px rgba(255, 215, 0, 0.6);
    transform: scale(1.02);
}

.captcha-image:active {
    transform: scale(0.99);
}

/* 响应式 - 移动端验证码布局 */
@media (max-width: 600px) {
    .captcha-group {
        flex-direction: row;
        gap: 10px;
    }

    .captcha-input {
        flex: 1;
        padding: 16px 18px;
        font-size: 15px;
    }

    .captcha-image {
        width: 130px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .captcha-group {
        flex-direction: row;
        gap: 10px;
    }

    .captcha-input {
        flex: 1;
        padding: 14px 16px;
        font-size: 14px;
    }

    .captcha-image {
        width: 120px;
        height: 48px;
    }
}

/* ========== 装饰光效 ========== */
.login-card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg,
        rgba(255, 215, 0, 0.6),
        rgba(255, 165, 0, 0.5),
        rgba(220, 20, 60, 0.6),
        rgba(255, 215, 0, 0.6));
    border-radius: 30px;
    z-index: -1;
    opacity: 0.8;
    transition: opacity 0.4s ease;
    filter: blur(8px);
}

.login-card:hover::before {
    opacity: 1;
}

.login-card::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg,
        rgba(255, 215, 0, 0.9),
        rgba(255, 165, 0, 0.7),
        rgba(220, 20, 60, 0.9),
        rgba(255, 215, 0, 0.9));
    border-radius: 30px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: borderGlow 3s linear infinite;
    background-size: 400% 400%;
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.login-card:hover::after {
    opacity: 0.6;
}

/* ========== 响应式设计 ========== */
@media (max-width: 900px) {
    .login-card {
        flex-direction: column;
        max-width: 90%;
    }

    .brand-section {
        min-width: auto;
        padding: 40px 40px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    }

    .form-section {
        min-width: auto;
        padding: 40px 40px;
    }

    .logo-image {
        height: 100px;
    }

    .main-title {
        font-size: 48px;
        letter-spacing: 6px;
    }

    .sub-title {
        font-size: 16px;
        letter-spacing: 4px;
    }
}

@media (max-width: 600px) {
    .brand-section {
        padding: 35px 30px;
    }

    .form-section {
        padding: 35px 30px;
    }

    .logo-image {
        height: 90px;
    }

    .main-title {
        font-size: 40px;
        letter-spacing: 4px;
    }

    .sub-title {
        font-size: 15px;
        letter-spacing: 3px;
    }

    .form-field {
        padding: 16px 50px 16px 50px;
        font-size: 15px;
    }

    .submit-button {
        padding: 18px 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .brand-section {
        padding: 30px 25px;
    }

    .form-section {
        padding: 30px 25px;
    }

    .logo-image {
        height: 80px;
    }

    .main-title {
        font-size: 36px;
        letter-spacing: 4px;
    }

    .sub-title {
        font-size: 14px;
        letter-spacing: 3px;
    }

    .form-item {
        margin-bottom: 26px;
    }

    .form-field {
        padding: 14px 45px 14px 45px;
        font-size: 15px;
        border-radius: 16px;
    }

    .form-label {
        font-size: 14px;
    }

    .submit-button {
        padding: 16px 26px;
        font-size: 15px;
        border-radius: 16px;
    }
}
