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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: #0f0f23;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(119, 198, 255, 0.3), transparent 50%);
    z-index: 0;
}

/* 背景动画气泡 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 50%;
    animation: rise 20s infinite ease-in-out;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bubble:nth-child(1) {
    width: 100px;
    height: 100px;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.bubble:nth-child(2) {
    width: 150px;
    height: 150px;
    left: 30%;
    animation-delay: 3s;
    animation-duration: 22s;
}

.bubble:nth-child(3) {
    width: 80px;
    height: 80px;
    left: 50%;
    animation-delay: 6s;
    animation-duration: 16s;
}

.bubble:nth-child(4) {
    width: 120px;
    height: 120px;
    left: 70%;
    animation-delay: 9s;
    animation-duration: 20s;
}

.bubble:nth-child(5) {
    width: 110px;
    height: 110px;
    left: 85%;
    animation-delay: 12s;
    animation-duration: 19s;
}

@keyframes rise {
    0% {
        bottom: -100px;
        transform: translateX(0);
    }
    50% {
        transform: translateX(100px);
    }
    100% {
        bottom: 110vh;
        transform: translateX(-100px);
    }
}

/* 主容器 */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 0.8s ease;
}

.title {
    font-size: 48px;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
}

/* 应用网格 */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    animation: fadeInUp 0.8s ease;
}

/* 应用卡片 */
.app-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

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

.app-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.app-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.app-card:nth-child(1) .app-icon { animation-delay: 0s; }
.app-card:nth-child(2) .app-icon { animation-delay: 0.2s; }
.app-card:nth-child(3) .app-icon { animation-delay: 0.4s; }
.app-card:nth-child(4) .app-icon { animation-delay: 0.6s; }

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

.app-name {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 10px;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.app-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    line-height: 1.6;
}

.app-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 45px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    z-index: 2;
}

.app-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.app-btn:hover::before {
    width: 300px;
    height: 300px;
}

.app-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #333;
}

/* 认证容器 */
.auth-container {
    text-align: center;
}

.auth-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
}

/* 标签切换 */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 表单 */
.auth-form {
    display: none;
    text-align: left;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

.form-group .hint-text {
    display: block;
    margin-top: 8px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.05);
    border-left: 3px solid #667eea;
    border-radius: 5px;
    font-size: 12px;
    color: #666;
    line-height: 1.6;
}

.info-box {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    text-align: center;
}

.info-box p {
    margin: 5px 0;
    font-size: 13px;
    color: #f57c00;
    font-weight: 500;
}

.info-box p:first-child {
    font-weight: bold;
    font-size: 14px;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* 动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 忘记密码链接 */
.forgot-link {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: #f59e0b;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s;
}

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

/* 触屏设备：禁用 hover 位移防止点击失效 */
@media (hover: none) {
    .app-card:hover {
        transform: none;
    }
    .app-btn:hover {
        transform: none;
    }
    .app-btn::before {
        display: none;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .title {
        font-size: 36px;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}
