/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/static/images/index-bg-pattern.jpg') center/cover no-repeat;
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    z-index: 1;
    pointer-events: none;
}

.container {
    max-width: 414px;
    margin: 0 auto;
    min-height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

/* 头部样式 */
.header {
    background: rgba(0, 0, 0, 0.4);
    color: white;
    padding: 12px 20px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-image: url('/static/mobile/images/header-bg.jpg');
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    z-index: 2;
}

.header > * {
    position: relative;
    z-index: 3;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.8px;
    color: #ffffff;
}

.subtitle {
    font-size: 15px;
    opacity: 0.95;
    margin-top: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.back-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 18px;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 主要内容区域 */
.main-content {
    padding: 25px 20px;
    flex: 1;
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    margin-bottom:20px;
    position: relative;
}

.section-title h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.section-title p {
    color: #666;
    font-size: 15px;
    font-weight: 500;
    opacity: 0.9;
}

/* 考区选择样式 */
.exam-areas {
    margin-bottom: 35px;
}

.area-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.area-item {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.area-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    z-index: 1;
}

.area-item > * {
    position: relative;
    z-index: 2;
}

.area-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.9);
}

.area-icon {
    font-size: 36px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.area-icon img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.area-item:hover .area-icon img {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.area-item h3 {
    font-size: 16px;
    color: #333;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex: 1;
}

.area-item p {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* 登录按钮区域 */
.login-section {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

/* 登录入口 */
.login-entry {
    text-align: center;
    padding: 25px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    margin-top: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.login-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    z-index: 1;
}

.login-entry > * {
    position: relative;
    z-index: 2;
}

.login-entry p {
    color: #666;
    margin-bottom: 18px;
    font-size: 15px;
    font-weight: 500;
}

/* 表单样式 */
.form-container {
    max-width: 100%;
}

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

.form-header h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.form-header p {
    color: #666;
    font-size: 14px;
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

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

.password-input {
    position: relative;
}

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

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

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

.checkbox-label {
    display: flex !important;
    vertical-align: middle !important;
    justify-content: center;
    align-items: flex-start !important;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5 !important;
    margin-bottom: 0;
}

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

.checkmark {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-outline {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-weight: 600;
}

.btn-outline:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-large {
    width: 100%;
    padding: 16px;
    font-size: 18px;
}

/* 链接样式 */
.link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.link:hover {
    color: #764ba2;
}

/* 底部样式 */
.footer {
    text-align: center;
    padding: 25px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    background: #292d32;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}




/* 页面加载动画 */
.area-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.area-item:nth-child(1) { animation-delay: 0.1s; }
.area-item:nth-child(2) { animation-delay: 0.2s; }
.area-item:nth-child(3) { animation-delay: 0.3s; }
.area-item:nth-child(4) { animation-delay: 0.4s; }
.area-item:nth-child(5) { animation-delay: 0.5s; }
.area-item:nth-child(6) { animation-delay: 0.6s; }
.area-item:nth-child(7) { animation-delay: 0.7s; }
.area-item:nth-child(8) { animation-delay: 0.8s; }
.area-item:nth-child(9) { animation-delay: 0.9s; }
.area-item:nth-child(10) { animation-delay: 1.0s; }

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

/* 图片优化 */
.area-icon img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    will-change: transform;
}

/* 响应式设计 */
@media (max-width: 375px) {
    .area-grid {
       /* grid-template-columns: 1fr;*/
        gap: 15px;
    }
    
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        max-width: 100%;
    }
    
    .area-item {
        padding: 15px;
        gap: 12px;
    }
    
    .area-icon img {
        width: 45px;
        height: 45px;
    }
    
    .area-item h3 {
        font-size: 15px;
    }
    
    .login-section {
        margin-top: 25px;
        margin-bottom: 15px;
    }
    
    .footer {
        padding: 20px 15px;
    }
}

/* 上传页面特殊布局 */
.upload-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.upload-row .upload-area {
    margin-bottom: 0;
}

.upload-row .upload-placeholder p {
    font-size: 14px;
    margin-bottom: 5px;
}

.upload-row .upload-tip {
    font-size: 11px;
    line-height: 1.3;
}

/* 响应式调整 */
@media (max-width: 375px) {
    .upload-row {
        gap: 10px;
    }
    
    .upload-row .upload-area {
        margin-bottom: 15px;
    }
}
