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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo h2 {
    color: white;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* 主内容区域 */
.main-content {
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 页面切换 */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* 首页样式 */
.hero {
    text-align: center;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
}

/* 上传区域 */
.upload-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.upload-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #667eea;
    background-color: #f8f9ff;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.upload-content p {
    margin-bottom: 20px;
    color: #666;
}



/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

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

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

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

/* 图库样式 */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.image-item:hover {
    transform: translateY(-5px);
}

.image-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.image-info {
    padding: 15px;
}

.image-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* API文档样式 */
.api-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.api-section h2 {
    color: #667eea;
    margin: 30px 0 20px 0;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.api-item {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 10px;
}

.api-item h3 {
    color: #333;
    margin-bottom: 15px;
}

.api-details p {
    margin-bottom: 10px;
}

.api-details pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    border-left: 4px solid #667eea;
}

.api-details code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* 说明页面样式 */
.about-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.about-content section {
    margin-bottom: 40px;
}

.about-content h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.about-content ul,
.about-content ol {
    margin-left: 20px;
}

.about-content li {
    margin-bottom: 8px;
}

/* 用户中心样式 */
.login-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.login-form {
    margin-top: 30px;
}

.login-form .form-group {
    display: block;
    margin-bottom: 20px;
    text-align: left;
}

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

.login-form input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    margin-bottom: 0;
    font-size: 1rem;
    box-sizing: border-box;
}

.user-center {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.user-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.token-generation,
.token-list {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 10px;
}

.form-group {
    display: flex;
    gap: 15px;
    align-items: end;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    min-width: 200px;
}

.token-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.token-info {
    flex: 1;
}

.token-actions {
    display: flex;
    gap: 10px;
}

/* 结果显示 */
.upload-result,
.result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 登录选择样式 */
.login-choice {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.btn-outline {
    background-color: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
    transform: translateY(-2px);
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* 用户信息 */
.user-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.user-info p {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

/* 邮件配置样式 */
.email-config {
    margin-top: 30px;
    padding: 25px;
    border: 2px solid #17a2b8;
    border-radius: 10px;
    background-color: #f8f9fa;
}

.email-config h2 {
    color: #17a2b8;
    margin-bottom: 20px;
    text-align: center;
}

.email-config .form-group {
    display: block;
    margin-bottom: 15px;
}

.email-config .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.email-config input[type="text"],
.email-config input[type="email"],
.email-config input[type="password"],
.email-config input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
}

.email-config input[type="checkbox"] {
    margin-right: 8px;
}

/* 我的Token样式 */
.my-tokens {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 10px;
}

.my-tokens h2 {
    color: #667eea;
    margin-bottom: 20px;
}

/* 结果显示增强 */
#registerResult,
#verifyResult,
#emailConfigResult {
    margin-top: 20px;
}

.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    .nav-menu {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .main-content {
        margin-top: 120px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .gallery-controls {
        flex-direction: column;
        gap: 15px;
    }

    .user-actions {
        flex-direction: column;
    }

    .form-group {
        flex-direction: column;
        align-items: stretch;
    }

    .token-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .login-buttons {
        gap: 10px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .email-config {
        padding: 15px;
    }
}