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

:root {
    --primary-color: #5B8DEE;
    --secondary-color: #6C5CE7;
    --background-color: #F8F9FA;
    --surface-color: #FFFFFF;
    --text-primary: #2C3E50;
    --text-secondary: #6C757D;
    --border-color: #E9ECEF;
    --success-color: #48C774;
    --danger-color: #FF3860;
    --warning-color: #FFDD57;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #F5F7FA 0%, #C3CFE2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* 头部样式 */
header {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

header h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header h1 a {
    text-decoration: none;
    color: inherit;
}

header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wallet-address {
    padding: 0.5rem 1rem;
    background: rgba(91, 141, 238, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(91, 141, 238, 0.3);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #F1F3F5;
    border-color: var(--primary-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #ff6565;
}

.btn-link {
    background: none;
    color: var(--primary-color);
    padding: 0;
    text-decoration: underline;
}

/* 项目列表 */
.project-list {
    margin: 2rem 0;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.list-header h2 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.project-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(91, 141, 238, 0.15);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-header {
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.project-header h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-header h3 a:hover {
    color: var(--primary-color);
}

.project-author {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: monospace;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.project-link:hover {
    text-decoration: underline;
}

.project-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* 项目详情 */
.project-detail {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.project-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.project-detail-header h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-actions {
    display: flex;
    gap: 1rem;
}

.project-info {
    margin-bottom: 2rem;
}

.project-website {
    margin: 1.5rem 0;
}

.project-description-full {
    margin-top: 2rem;
}

.project-description-full h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-description-full p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 评论区 */
.comments-section {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.comments-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.comment-form {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    background: #F8F9FA;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment {
    background: #F8F9FA;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-author {
    color: var(--primary-color);
    font-family: monospace;
    font-size: 0.9rem;
}

.comment-time {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.comment-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.no-comments {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

/* 表单样式 */
.form-container {
    max-width: 600px;
    margin: 2rem auto;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-container h2 {
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: #F8F9FA;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Turnstile容器 */
.cf-turnstile {
    margin: 1rem 0;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.page-info {
    color: var(--text-secondary);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state p {
    margin-bottom: 1rem;
}

.text-muted {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 提示框 */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-info {
    background: rgba(91, 141, 238, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

/* 页脚 */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    header nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .project-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* 加载动画 */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(90deg, var(--surface-color) 0%, #E9ECEF 50%, var(--surface-color) 100%);
    background-size: 1000px 100%;
}