/* 全局变量和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00c6ff;
    --primary-dark: #0072ff;
    --secondary-color: #1a1f36;
    --secondary-dark: #0f1225;
    --accent-color: #7f00ff;
    --success-color: #00d68f;
    --warning-color: #ffb800;
    --danger-color: #ff3860;
    --light-color: #f0f4f8;
    --dark-color: #121212;
    --text-color: #e0e0e0;
    --text-secondary: #a0a0a0;
    --box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    --box-shadow-hover: 0 12px 24px rgba(0,0,0,0.25);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 12px;
    --grid-gap: 1.5rem;
}

/* 基础布局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-dark);
    background-image: 
        linear-gradient(135deg, rgba(26, 31, 54, 0.97) 0%, rgba(15, 18, 37, 0.97) 100%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232a3a5a' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    /* 强制始终显示滚动条，避免导航栏位置变化 */
    overflow-y: scroll;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 10%, rgba(0, 198, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 90%, rgba(127, 0, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 主内容区域 */
main {
    margin-top: 3.8rem;
    padding: 0.7rem 1.5rem;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    flex: 1;
}

.target-container {
    padding: 0.4rem 0;
    width: 100%;
    max-width: 100%;
}

.target-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 页面切换动画 */
.page {
    display: none;
    animation: fadeIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    transform: translateY(10px);
    padding-top: 0.25rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 网格布局 */
.target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--grid-gap);
    width: 100%;
    align-items: stretch;
}

.target-grid .target-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.target-grid .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.target-grid .card-actions {
    margin-top: auto;
}

/* 页脚样式 */
footer {
    background-color: var(--secondary-color);
    color: var(--text-secondary);
    padding: 2rem 0;
    margin-top: auto;
    border-top: 1px solid rgba(0, 198, 255, 0.1);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 响应式断点 */
@media (max-width: 1200px) {
    .target-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .target-grid {
        grid-template-columns: 1fr;
    }

    main {
        margin-top: 3.8rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .target-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
