/* ==================== CSS变量 ==================== */
:root {
    --bg-primary: #F5F0E8;
    --bg-secondary: #E8DFD0;
    --text-primary: #2D3A2E;
    --text-secondary: #5A6B5D;
    --accent-orange: #D4845A;
    --accent-brown: #A0522D;
    --border-color: #D0C4B0;
    
    --font-display: 'Playfair Display', serif;
    --font-serif: 'Noto Serif SC', serif;
    --font-sans: 'Noto Sans SC', sans-serif;
    
    --shadow-sm: 0 2px 8px rgba(45, 58, 46, 0.08);
    --shadow-md: 0 4px 16px rgba(45, 58, 46, 0.12);
    --shadow-lg: 0 8px 32px rgba(45, 58, 46, 0.16);
}

/* ==================== 全局重置与防复制 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none; /* 防止选取 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    
    /* 防止右键 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 防止拖拽图片 */
img {
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* ==================== 访问限制提示框 ==================== */
.access-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0, 0, 0, 0.92);
    color: white;
    padding: 2.5rem 4rem;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-style: italic;
    letter-spacing: 0.02em;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.access-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.access-notification p {
    margin: 0;
    text-align: center;
}

/* ==================== 主容器 ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==================== 顶部导航 ==================== */
.header {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

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

.logo-section {
    flex-shrink: 0;
}

.site-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.site-subtitle {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--accent-orange);
    font-weight: 500;
    letter-spacing: 0.1em;
}

/* ==================== 搜索区域 ==================== */
.search-section {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    border-radius: 4px;
    outline: none;
    transition: all 0.2s ease;
    user-select: text; /* 允许搜索框内选取 */
    -webkit-user-select: text;
}

.search-input:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(212, 132, 90, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.search-button {
    padding: 0.75rem 1.25rem;
    background: var(--accent-orange);
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background: var(--accent-brown);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.search-button:active {
    transform: translateY(0);
}

/* ==================== 公告横幅 ==================== */
.announcement-banner {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-brown));
    color: white;
    padding: 0.875rem 1.5rem;
    margin-bottom: 3rem;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.announcement-banner p {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.02em;
}

/* ==================== 主方块网格 ==================== */
.main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* ==================== 方块样式 ==================== */
.grid-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(212, 132, 90, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-orange);
}

.grid-item:hover::before {
    opacity: 1;
}

/* 元老院特殊样式 */
.senate-item {
    background: linear-gradient(135deg, #2D3A2E, #3A4B3C);
    border-color: #2D3A2E;
    color: white;
}

.senate-item:hover {
    background: linear-gradient(135deg, #3A4B3C, #2D3A2E);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.senate-item .platform-name {
    color: white;
}

/* ==================== 图标 ==================== */
.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.platform-icon {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* ==================== 平台名称 ==================== */
.platform-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin: 0;
}

/* ==================== 底部 ==================== */
.footer {
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.copyright {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .site-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .site-subtitle {
        text-align: center;
    }
    
    .search-section {
        max-width: 100%;
    }
    
    .main-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .grid-item {
        padding: 2.5rem 1.5rem;
    }
    
    .announcement-banner p {
        font-size: 0.85rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .main-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .main-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
