* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', sans-serif;
}

/* 基本样式定义 */
.hidden {
    display: none !important;
}

.form-container {
    width: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transform: translateY(0);
    transition: all 0.3s ease;
}

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

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

.login-header h2 {
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 16px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.form-group input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.error-message {
    background-color: #fff5f5;
    color: #e53e3e;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #feb2b2;
    display: flex;
    align-items: center;
}

.error-message:before {
    content: "⚠";
    margin-right: 8px;
    font-size: 16px;
}

.success-message {
    background-color: #f0fff4;
    color: #38a169;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #9ae6b4;
    display: flex;
    align-items: center;
}

.success-message:before {
    content: "✓";
    margin-right: 8px;
    font-size: 16px;
}

.info-message {
    background-color: #ebf8ff;
    color: #3182ce;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #bee3f8;
    display: flex;
    align-items: center;
}

.info-message:before {
    content: "\2139";
    margin-right: 8px;
    font-size: 16px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.submit-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: all 0.6s;
}

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

.mode-switch {
    text-align: center;
    margin-top: 20px;
}

.mode-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mode-switch a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.generate-code-btn {
    background: transparent;
    color: #667eea;
    border: 1px solid #667eea;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.generate-code-btn:hover {
    background: #667eea;
    color: white;
}

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

    .login-header h2 {
        font-size: 24px;
    }

    .form-group input {
        font-size: 15px;
    }
}

/* 添加加载动画 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: loading 0.8s linear infinite;
}

@keyframes loading {
    to {
        transform: rotate(360deg);
    }
}

/* 添加输入框动画效果 */
.form-group input:focus + .focus-border {
    width: 100%;
    transition: 0.4s;
}

.focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #667eea;
    transition: 0.4s;
}

/* 添加一些必要的样式 */
.phone-verification {
    display: flex;
    gap: 10px;
}

.phone-verification input {
    flex: 1;
}

.send-sms-btn {
    padding: 8px 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    min-width: 120px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.send-sms-btn:hover {
    background-color: #45a049;
}

.send-sms-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 添加产品选择和充值卡输入框的样式 */
select.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
}

select.form-control:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

#cardCodeGroup {
    margin-top: 15px;
    transition: all 0.3s ease;
}

#cardCodeGroup.hidden {
    display: none !important;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* 添加一些必要的响应式样式 */
@media (max-width: 480px) {
    select.form-control {
        font-size: 16px; /* 移动端更大的字体 */
    }
}
