/* Login Page Styles - Based on Original Design */
body {
    background-image: url('/static/apps/front/site/images/login_bg.png');
    background-size: 100% auto;
    background-color: #17161b;
    background-repeat: no-repeat;
    background-position: top center;
}

.login-container {
    min-height: 100vh;
    padding: 0;
}

.login-box {
    background: transparent;
    width: 100%;
    max-width: 100%;
}

/* Logo Header */
.login-header {
    text-align: center;
    margin-top: 13.6vw;
    margin-bottom: 0;
}

.login-header .logo {
    text-align: center;
}

.login-header .logo img {
    width: 22.5vw;
    max-width: 200px;
}

/* Show Image */
.login-show {
    text-align: center;
    margin-top: 9vw;
    margin-bottom: 4vw;
}

.login-show img {
    width: 88vw;
    max-width: 400px;
}

/* Login Form */
.login-form {
    margin-top: 4vw;
    margin-left: 4.5vw;
    margin-right: 4.5vw;
}

/* Input Wrapper Styles - Matching Original Design */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 3vw;
    margin-bottom: 3vw;
    border: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-icon-left {
    width: 17vw;
    height: 11vw;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.input-icon-left img {
    width: 50%;
    max-width: 30px;
}

.input-wrapper .form-control {
    flex: 1;
    height: 11vw;
    min-height: 50px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 4vw;
    padding: 0 1rem;
    outline: none;
}

.input-wrapper .form-control::placeholder {
    color: rgba(214, 214, 214, 0.6);
}

.input-wrapper .form-control:focus {
    outline: none;
    border: none;
    box-shadow: none;
    background: transparent;
    color: #fff;
}

/* 输入框聚焦时的亮蓝色边框 */
.input-wrapper:focus-within {
    border: 1px solid #179cff;
    box-shadow: 0 0 0 2px rgba(23, 156, 255, 0.2);
}

/* 修复浏览器自动填充时的背景色 */
.input-wrapper .form-control:-webkit-autofill,
.input-wrapper .form-control:-webkit-autofill:hover,
.input-wrapper .form-control:-webkit-autofill:focus,
.input-wrapper .form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.08) inset !important;
    -webkit-text-fill-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: #fff;
}

.input-icon-right {
    width: 17vw;
    height: 11vw;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.input-icon-right img {
    width: 50%;
    max-width: 30px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.input-icon-right:hover img {
    opacity: 1;
}

/* 密码切换按钮样式 */
.password-toggle {
    cursor: pointer;
}

.password-toggle i {
    font-size: 18px;
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.password-toggle:hover i {
    opacity: 1;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    margin-top: 6vw;
    font-size: 3vw;
}

.remember-me {
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
}

.remember-me input[type="checkbox"] {
    cursor: pointer;
    margin-right: 0.5rem;
    width: 16px;
    height: 16px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    background-color: transparent;
    position: relative;
    transition: all 0.2s;
}

.remember-me input[type="checkbox"]:checked {
    background-color: #179cff;
    border-color: #179cff;
}

.remember-me input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 3vw;
}

.forgot-password:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

/* Login Button - Matching Original Gradient */
.form-btn {
    margin-top: 8vw;
}

.login-btn,
.register-btn {
    background: linear-gradient(359.21deg, #1f59ff 0.74%, #218bff 27.83%, #4af4ff 99.37%);
    border-radius: 3.076923vw;
    width: 100%;
    height: 13vw;
    min-height: 50px;
    color: #fff;
    font-size: 4.5vw;
    font-weight: normal;
    border: none;
    transition: all 0.3s;
}

.login-btn:hover,
.register-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31, 89, 255, 0.4);
}

.login-btn:active,
.register-btn:active {
    transform: translateY(0);
}

/* Form Rule - Agreement */
.form-rule {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6vw;
    font-size: 3vw;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.form-rule .remember-me {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.form-rule .rule-link {
    color: #179cff;
    text-decoration: none;
    margin: 0 0.5vw;
}

.form-rule .rule-link:hover {
    text-decoration: underline;
}

/* Modal Styles */
.terms-content,
.privacy-content {
    line-height: 1.8;
}

.terms-content h6,
.privacy-content h6 {
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #333;
}

.terms-content h6:first-child,
.privacy-content h6:first-child {
    margin-top: 0;
}

.terms-content p,
.privacy-content p {
    margin-bottom: 0.75rem;
    color: #666;
    font-size: 14px;
}

.feature-disabled-content {
    padding: 1rem 0;
}

.feature-disabled-content p {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.modal-content {
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid #eee;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #333;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #eee;
    padding: 1rem 1.5rem;
}

.btn-close {
    opacity: 0.5;
}

.btn-close:hover {
    opacity: 1;
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: 70vh;
    }
    
    .terms-content h6,
    .privacy-content h6 {
        font-size: 16px;
    }
    
    .terms-content p,
    .privacy-content p {
        font-size: 13px;
    }
}

/* More Options */
.form-more {
    display: flex;
    justify-content: space-between;
    margin-top: 6vw;
}

.form-more a {
    width: 30%;
    display: flex;
    align-items: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 3vw;
    text-decoration: none;
}

.form-more a > div {
    margin-left: auto;
    margin-right: auto;
    background: rgba(255, 255, 255, 0.04);
    width: 100%;
    border-radius: 3vw;
    padding-top: 2vw;
    padding-bottom: 2vw;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-more a > div:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.form-more a > div > div:first-child {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1vw;
}

.form-more a > div img {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
}

.form-more a > div > div:last-child {
    font-size: 3vw;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.form-more a:hover > div > div:last-child {
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive - Desktop */
@media (min-width: 768px) {
    .login-header {
        margin-top: 5rem;
    }
    
    .login-header .logo img {
        width: 180px;
    }
    
    .login-show {
        margin-top: 3rem;
    }
    
    .login-show img {
        width: 400px;
    }
    
    .login-form {
        max-width: 500px;
        margin: 2rem auto;
    }
    
    .input-wrapper {
        border-radius: 12px;
        margin-bottom: 1.5rem;
        border: 1px solid transparent;
    }
    
    .input-icon-left,
    .input-icon-right {
        width: 60px;
        height: 50px;
    }
    
    .input-wrapper .form-control {
        height: 50px;
        font-size: 16px;
        padding: 0 1rem;
    }
    
    .input-wrapper .form-control:-webkit-autofill,
    .input-wrapper .form-control:-webkit-autofill:hover,
    .input-wrapper .form-control:-webkit-autofill:focus,
    .input-wrapper .form-control:-webkit-autofill:active {
        -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.08) inset !important;
    }
    
    .input-wrapper:focus-within {
        border: 1px solid #179cff;
        box-shadow: 0 0 0 2px rgba(23, 156, 255, 0.2);
    }
    
    .form-options {
        font-size: 14px;
        margin-top: 2rem;
    }
    
    .forgot-password {
        font-size: 14px;
    }
    
    .form-btn {
        margin-top: 2rem;
    }
    
    .login-btn,
    .register-btn {
        height: 50px;
        font-size: 16px;
        border-radius: 12px;
    }
    
    .form-more {
        margin-top: 2rem;
    }
    
    .form-more a {
        font-size: 14px;
    }
    
    .form-more a > div {
        border-radius: 12px;
        padding: 1rem 0;
    }
    
    .form-more a > div img {
        width: 24px;
        height: 24px;
        max-width: 24px;
        max-height: 24px;
    }
    
    .form-more a > div > div:last-child {
        font-size: 14px;
        margin-top: 0.5rem;
    }
    
    .form-rule {
        font-size: 14px;
        margin-top: 2rem;
    }
    
    .form-rule .rule-link {
        margin: 0 0.25rem;
    }
}

/* 检测浏览器自动填充 */
@keyframes onAutoFillStart {
    from {
        opacity: 0;
    }
    to {
        opacity: 0;
    }
}

input:-webkit-autofill {
    animation-name: onAutoFillStart;
    animation-duration: 0.001s;
}

/* Responsive - Mobile */
@media (max-width: 576px) {
    .login-header {
        margin-top: 8vw;
    }
    
    .login-show {
        margin-top: 6vw;
    }
    
    .input-wrapper .form-control {
        font-size: 15px;
    }
    
    .login-btn {
        font-size: 16px;
    }
    
    .form-options {
        font-size: 14px;
    }
    
    .form-more a > div > div:last-child {
        font-size: 12px;
    }
}

