* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #333;
    overflow-x: hidden;
    position: relative;
    background: linear-gradient(135deg, #6c5ce7 0%, #fd79a8 100%);
}

/* 视频背景样式 */
.video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    object-position: center;
    z-index: -2;
    background-color: #000;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

/* 声音控制按钮 */
.sound-button {
    position: fixed;
    top: 16px;
    right: 16px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 10px;
    border-radius: 50%;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    font-size: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 头部 Logo 区域 */
.logo-container {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    font-size: clamp(1.8rem, 8vw, 3rem);
    font-weight: bold;
    background: linear-gradient(135deg, #6c5ce7 0%, #fd79a8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
}

.logo-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(0.875rem, 3vw, 1rem);
}

/* 登录卡片容器 */
.card-wrapper {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 10;
    padding: 8px 0;
}

.card {
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.7);
}

/* 表单通用样式 */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-input-wrapper {
    position: relative;
}

.form-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
    outline: none;
    background-color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    -webkit-appearance: none;
}

.form-input:focus {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.form-link {
    font-size: 14px;
    color: #6c5ce7;
    text-decoration: none;
}

.form-link:hover {
    text-decoration: underline;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 16px;
    padding: 8px;
}

/* 按钮样式 */
.btn {
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.btn-gradient {
    background: linear-gradient(135deg, #6c5ce7 0%, #fd79a8 100%);
    color: white;
}

.btn-outline {
    background-color: rgba(255, 255, 255, 0.8);
    color: #6c5ce7;
    border: 1px solid #6c5ce7;
}

/* 模态框 */
.modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-container.active {
    display: flex;
}

.modal-box {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    padding: 28px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-container.active .modal-box {
    transform: scale(1);
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 4px;
    z-index: 1;
}

.modal-title {
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.modal-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: #666;
}

.modal-link {
    color: #6c5ce7;
    text-decoration: none;
}

.modal-link:hover {
    text-decoration: underline;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 成功提示 */
.success-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(76, 175, 80, 0.9);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    text-align: center;
    font-weight: 500;
}

/* 防止移动端输入框缩放 */
@media (max-width: 480px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* 防止iOS样式覆盖 */
input, textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}