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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* 顶部导航栏 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.site-title {
    font-size: 18px;
    font-weight: 600;
}

.site-desc {
    font-size: 12px;
    opacity: 0.8;
}

.search-bar {
    width: 100%;
    padding: 12px 16px;
    border-radius: 25px;
    border: none;
    font-size: 14px;
    background-color: rgba(255,255,255,0.2);
    color: white;
    outline: none;
    transition: background-color 0.3s;
}

.search-bar::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-bar:focus {
    background-color: rgba(255,255,255,0.3);
}

/* 分类标签 */
.category-tabs {
    display: flex;
    overflow-x: auto;
    padding: 12px 16px;
    background-color: white;
    gap: 12px;
    border-bottom: 1px solid #eee;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    background-color: #f5f5f5;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

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

/* 资源列表 */
.resource-list {
    padding: 16px;
}

.resource-item {
    background-color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.resource-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.resource-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.resource-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resource-info {
    flex: 1;
    min-width: 0;
}

.resource-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #999;
}

.tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
}

.tag.top {
    background-color: #fef3c7;
    color: #d97706;
}

.tag.new {
    background-color: #d1fae5;
    color: #059669;
}

.arrow {
    color: #ccc;
    font-size: 18px;
    line-height: 64px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px;
    padding-bottom: 80px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: white;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.page-btn:hover {
    background-color: #667eea;
    color: white;
}

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

.page-ellipsis {
    color: #999;
    padding: 0 4px;
}

/* 资源详情页 */
.detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
}

.detail-main-image {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
}

.detail-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.detail-meta {
    font-size: 13px;
    opacity: 0.9;
}

.detail-content {
    padding: 16px;
}

.detail-section {
    background-color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.desc-text {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.screenshot-count {
    font-size: 12px;
    font-weight: 400;
    color: #999;
    margin-left: 8px;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.images-grid .screenshot {
    width: 310%;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}

.images-grid .screenshot:hover {
    transform: scale(1.02);
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #999;
    font-size: 14px;
}

.info-value {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.download-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s;
}

.download-btn.kuake {
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    color: white;
}

.download-btn.yidong {
    background: linear-gradient(135deg, #0066ff 0%, #0099ff 100%);
    color: white;
}

.download-btn.baidu {
    background: linear-gradient(135deg, #1e73be 0%, #2383df 100%);
    color: white;
}

.download-btn:hover {
    opacity: 0.9;
}

.download-btn.disabled {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #999;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 20px;
}

.btn-text {
    font-size: 15px;
}

.btn-nolink {
    font-size: 12px;
    color: #ff6b6b;
    font-weight: normal;
    margin-left: 8px;
}

.back-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.2);
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

/* 后台登录页面 */
.login-container {
    max-width: 360px;
    margin: 80px auto;
    padding: 0 16px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin: 0 auto 16px;
}

.login-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.login-form {
    background-color: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

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

.login-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: 600;
    cursor: pointer;
    margin-top: 8px;
}

/* 后台管理页面 */
.admin-header {
    background-color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.logout-btn {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.admin-content {
    padding: 16px;
}

.add-btn {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 16px;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-search-input {
    flex: 1;
    max-width: 300px;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.admin-search-input:focus {
    border-color: #667eea;
}

.admin-table {
    width: 100%;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
}

.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.admin-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #666;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.action-btn {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    border: none;
    margin-right: 6px;
}

.action-btn.edit {
    background-color: #e0f2fe;
    color: #0284c7;
}

.action-btn.delete {
    background-color: #fee2e2;
    color: #dc2626;
}

/* 发表资源表单 */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 16px;
}

.form-card {
    background-color: white;
    border-radius: 12px;
    padding: 24px;
}

.form-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 24px;
}

.form-row {
    margin-bottom: 16px;
}

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

.form-row input, .form-row textarea, .form-row select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
    border-color: #667eea;
}

.form-row textarea {
    resize: vertical;
    min-height: 80px;
}

.image-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.image-url-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
}

.add-image-btn {
    width: 40px;
    height: 40px;
    border: 1px dashed #ddd;
    border-radius: 8px;
    background-color: #f8f9fa;
    color: #667eea;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.add-image-btn:hover {
    border-color: #667eea;
    background-color: #f0f0ff;
}

.remove-image-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background-color: #ff4d4f;
    color: white;
    font-size: 14px;
    cursor: pointer;
    position: absolute;
    top: -8px;
    right: -8px;
}

.user-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-btn {
    padding: 6px 12px;
    background-color: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    color: white;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.user-btn:hover {
    background-color: rgba(255,255,255,0.3);
}

.register-btn {
    background-color: #f59e0b;
    border-color: #f59e0b;
}

.register-btn:hover {
    background-color: #d97706;
    border-color: #d97706;
}

.preview-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.preview-image {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 图片预览弹窗 */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.image-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.close-overlay:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

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

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #999;
    font-size: 12px;
}

.nav-item.active {
    color: #667eea;
}

.nav-item i {
    font-size: 20px;
}

@media (min-width: 768px) {
    .container {
        max-width: 600px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
    }
}

.promo-container {
    background-color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.promo-container a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.promo-container a:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.promo-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.promo-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.promo-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ad-section h4 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 15px;
}
