/* 首页Hero登录表单样式 */
.hero-login-box {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 400px;
    padding: 20px;
    padding-right: 40px; /* 增加右边距 */
}

/* Hero section 左侧文字与右侧登录框顶部对齐 */
.home-section {
    padding-top: 180px; /* 再次增加顶部间距 */
}

.home-section .row {
    align-items: flex-start !important;
}

/* 计算对齐：登录框容器padding(20px) + 登录卡片顶部边距 */
.home-section .text-box {
    margin-top: calc(20px + 0px); /* 与登录框顶部边缘对齐 */
    margin-left: 40px; /* 整体向右移动 */
}

/* 新的品牌展示样式 */
.brand-title {
    margin-bottom: 20px;
}

.brand-name {
    color: #ff8503;
    font-size: 36px;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

.supplier-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.supplier-text {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.verified-icon {
    color: #00bfff;
    font-size: 20px;
}

.main-slogan {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    line-height: 1.3;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin-bottom: 25px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 14px;
}

.feature-icon {
    color: #00ff00;
    font-size: 16px;
    flex-shrink: 0;
}

.price-highlight {
    background: linear-gradient(135deg, #6a0dad, #4b0082);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #ff8503;
}

.price-text {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.btn-primary {
    background: linear-gradient(135deg, #ff8503, #ffa726);
    color: #fff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e6750a, #ff8503);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 133, 3, 0.4);
    color: #fff;
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 15px 30px;
    border: 2px solid #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.stats-section {
    display: flex;
    gap: 30px;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff8503, #ffa726);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

.stat-icon.happy {
    background: linear-gradient(135deg, #ff8503, #ffa726);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    color: #ff8503;
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-top: 2px;
}

/* 确保欢迎框也有相同的对齐 */
.hero-welcome-box {
    align-items: flex-start !important;
    padding-top: 20px; /* 与登录框容器保持一致 */
}

.login-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 35px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h4 {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ff8503, #ffa726);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 0;
}

.hero-login-form .input-group {
    margin-bottom: 20px;
    position: relative;
}

.hero-login-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    padding: 15px 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    height: auto;
}

/* 确保密码输入框右边圆角正常显示 */
.hero-login-form .input-group .form-control[type="password"] {
    padding-right: 50px;
    border-radius: 12px !important;
}

.hero-login-form .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ff8503;
    box-shadow: 0 0 0 0.2rem rgba(255, 133, 3, 0.25);
    outline: none;
}

.hero-login-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    margin: 0;
}

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

.checkmark {
    position: relative;
    height: 18px;
    width: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.remember-me input[type="checkbox"]:checked ~ .checkmark {
    background: #ff8503;
    border-color: #ff8503;
}

.remember-me input[type="checkbox"]:checked ~ .checkmark:after {
    content: "✓";
    position: absolute;
    left: 3px;
    top: -1px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-link {
    color: #ff8503;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #ffa726;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #ff8503, #ffa726);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    background: linear-gradient(135deg, #e67502, #ff9800);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 133, 3, 0.3);
}

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

.social-login {
    margin-bottom: 20px;
}

.divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.divider span {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 0 15px;
    font-size: 12px;
    position: relative;
    z-index: 1;
}

.btn-google {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #fff;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

/* Google SVG 图标样式 */
.btn-google svg {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.btn-google:hover svg {
    transform: scale(1.05);
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    text-decoration: none;
}

.btn-google:hover .fab.fa-google {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.register-link {
    text-align: center;
    margin-top: 20px;
}

.register-link p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin: 0;
}

.register-link a {
    color: #ff8503;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    color: #ffa726;
    text-decoration: underline;
}

.recaptcha-box {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.text-danger {
    color: #ff6b6b !important;
    font-size: 12px;
    margin-top: 5px;
}

/* 已登录用户的欢迎框 */
.hero-welcome-box {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start; /* 顶部对齐 */
    min-height: 400px;
    padding: 20px;
    padding-right: 40px; /* 增加右边距 */
}

.welcome-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 35px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    transition: all 0.3s ease;
}

.welcome-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.welcome-header h4 {
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ff8503, #ffa726);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 25px;
}

.quick-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    color: #ff8503;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.quick-actions {
    display: flex;
    gap: 10px;
}

.btn-dashboard,
.btn-order {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-dashboard {
    background: linear-gradient(135deg, #ff8503, #ffa726);
    color: white;
}

.btn-order {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-dashboard:hover {
    background: linear-gradient(135deg, #e67502, #ff9800);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-order:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 991px) {
    .home-section {
        padding-top: 150px; /* 平板端再次增加顶部间距 */
    }
    
    .hero-login-box,
    .hero-welcome-box {
        min-height: 350px;
        padding: 15px;
        padding-right: 15px; /* 重置右边距 */
        justify-content: center; /* 在中等屏幕上居中显示 */
    }
    
    /* 平板端重新居中对齐 */
    .home-section .row {
        align-items: center !important;
    }
    
    .home-section .text-box {
        margin-top: 0; /* 重置margin */
        margin-left: 0; /* 重置左边距 */
    }
    
    /* 平板端响应式调整 */
    .brand-name {
        font-size: 28px;
    }
    
    .main-slogan {
        font-size: 24px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .login-card,
    .welcome-card {
        padding: 30px 25px;
        max-width: 350px;
    }
    
    .login-header h4,
    .welcome-header h4 {
        font-size: 20px;
    }
}

@media (max-width: 575px) {
    .home-section {
        padding-top: 70px; /* 手机端进一步减少顶部间距 */
    }
    
    .home-section .text-box {
        margin-left: 0; /* 手机端重置左边距 */
    }
    
    /* 手机端响应式调整 */
    .brand-name {
        font-size: 24px;
    }
    
    .main-slogan {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .features-grid {
        margin-bottom: 20px;
    }
    
    .feature-item {
        font-size: 13px;
    }
    
    .price-highlight {
        padding: 12px 15px;
        margin-bottom: 20px;
    }
    
    .price-text {
        font-size: 14px;
    }
    
    .action-buttons {
        margin-bottom: 25px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .stat-box {
        padding: 15px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .hero-login-box,
    .hero-welcome-box {
        min-height: 300px;
        padding: 10px;
        padding-right: 10px; /* 重置右边距 */
        justify-content: center; /* 在小屏幕上居中显示 */
    }
    
    .login-card,
    .welcome-card {
        padding: 25px 20px;
        max-width: 100%;
    }
    
    .login-header h4,
    .welcome-header h4 {
        font-size: 18px;
    }
    
    .hero-login-form .form-control {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .btn-login {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .quick-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .stat-number {
        font-size: 20px;
    }
}

/* 交互增强样式 */
.input-group.focused .form-control {
    border-color: #ff8503 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 133, 3, 0.25) !important;
}

.input-group.error .form-control {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 107, 0.25) !important;
}

.input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    z-index: 10;
    padding: 5px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #ff8503;
}

.login-card.shake {
    animation: shake 0.6s ease-in-out;
}

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

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    z-index: 1000;
}

.loading-spinner {
    text-align: center;
    color: #fff;
}

.loading-spinner i {
    font-size: 24px;
    color: #ff8503;
    margin-bottom: 10px;
}

.loading-spinner p {
    margin: 0;
    font-size: 14px;
}

.btn-google.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* 移动端优化 */
.login-card.mobile,
.welcome-card.mobile {
    border-radius: 15px;
    padding: 25px 20px;
}

.login-card.mobile .login-header h4,
.welcome-card.mobile .welcome-header h4 {
    font-size: 18px;
}

.login-card.mobile .hero-login-form .form-control {
    padding: 12px 45px 12px 15px;
    font-size: 14px;
}

.login-card.mobile .password-toggle {
    right: 12px;
}

/* 暗黑模式适配 */
.dark-mode .login-card,
.dark-mode .welcome-card {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.9), rgba(40, 40, 40, 0.8));
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .hero-login-form .form-control {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .hero-login-form .form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ff8503;
}

.dark-mode .btn-google {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .btn-google:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 暗黑模式下的Google SVG图标保持原样 */

.dark-mode .btn-google:hover svg {
    transform: scale(1.05);
}

/* 可访问性改进 */
.hero-login-form .form-control:focus-visible {
    outline: 2px solid #ff8503;
    outline-offset: 2px;
}

.btn-login:focus-visible,
.btn-google:focus-visible {
    outline: 2px solid #ff8503;
    outline-offset: 2px;
}

/* 动画优化 */
@media (prefers-reduced-motion: reduce) {
    .login-card,
    .welcome-card,
    .btn-login,
    .btn-google,
    .form-control {
        transition: none !important;
    }
    
    .login-card.shake {
        animation: none !important;
    }
}

/* 手机端按钮和统计数据强制并排显示 - 最高优先级 */
@media screen and (max-width: 768px) {
    .home-section .text-box .action-buttons {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
        justify-content: space-between !important;
        margin-bottom: 40px !important;
    }
    
    .home-section .text-box .action-buttons .btn-primary,
    .home-section .text-box .action-buttons .btn-secondary {
        flex: 1 !important;
        min-width: 0 !important;
        padding: 12px 8px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* 手机端统计数据并排显示 */
    .home-section .text-box .stats-section {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 15px !important;
        justify-content: space-between !important;
    }
    
    .home-section .text-box .stats-section .stat-box {
        flex: 1 !important;
        min-width: 0 !important;
        padding: 12px 8px !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    .home-section .text-box .stats-section .stat-number {
        font-size: 16px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .home-section .text-box .stats-section .stat-label {
        font-size: 11px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* 手机端统计图标大小调整 */
    .home-section .text-box .stats-section .stat-icon {
        width: 35px !important;
        height: 35px !important;
        font-size: 16px !important;
        flex-shrink: 0 !important;
    }
    
    .home-section .text-box .stats-section .stat-content {
        min-width: 0 !important;
        flex: 1 !important;
    }
    
    /* 手机端快速登录栏宽度调整 */
    .hero-login-box .login-card,
    .hero-welcome-box .welcome-card {
        max-width: 90% !important;
        width: 90% !important;
        padding: 30px 25px !important;
    }
    
    .hero-login-box,
    .hero-welcome-box {
        padding: 5px 10px !important;
        justify-content: center !important;
        margin-top: -30px !important;
    }
    
    /* 手机端文字栏内容区域调整 - 宽度95% */
    .home-section .text-box {
        max-width: 95% !important;
        width: 95% !important;
        margin: 0 auto !important;
        padding: 20px 18px !important;
        margin-bottom: 10px !important;
    }
}
