* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 400px;
}

.form-box {
    background: white;
    border-radius: 10px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.form-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.captcha-group {
    display: flex;
    gap: 10px;
}

.captcha-group input {
    flex: 1;
}

#captchaCanvas {
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
}

/* 用户中心样式 */
.header {
    background: white;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 20px;
    color: #333;
}

.logout-btn {
    padding: 8px 20px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.main-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.user-info {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.balance-box {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
    margin-bottom: 20px;
}

.balance-box .label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.balance-box .amount {
    font-size: 36px;
    font-weight: bold;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.menu-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.menu-item .icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.task-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.task-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.3s;
}

.task-card:hover {
    transform: translateY(-5px);
}

.task-card img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.task-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.task-card .amount {
    color: #f44336;
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
}

.task-card .condition {
    color: #666;
    font-size: 14px;
}

.btn-accept {
    width: 100%;
    padding: 10px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    margin-top: 15px;
    cursor: pointer;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 20px;
}

.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.upload-box {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
    cursor: pointer;
}

.upload-box:hover {
    border-color: #667eea;
}

.preview-image {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 10px;
}

/* 响应式 */
@media (max-width: 768px) {
    body {
        background: white;
    }

    .form-box {
        box-shadow: none;
        padding: 20px;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .task-list {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 16px;
    }
}
