/* ============================================
   Global Styles - 建筑作品库
   简洁 · 大气 · 未来
   ============================================ */

/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    letter-spacing: 0.005em;
}

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== Header ===== */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    padding: 0.9rem 2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    padding: 0.6rem 2rem;
    background: rgba(255, 255, 255, 0.92);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ===== Logo ===== */
.logo {
    color: #0f172a;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    letter-spacing: -0.01em;
}

.logo:hover .logo-icon {
    transform: scale(1.05);
}

.logo-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: transform 0.3s ease;
}

.logo span {
    color: #0f172a;
}

/* ===== Navigation ===== */
.main-nav {
    display: flex;
    gap: 0.15rem;
    align-items: center;
}

.main-nav a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.95rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.main-nav a:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.04);
}

.main-nav a.active {
    color: #0f172a;
    font-weight: 600;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 2px;
    background: #0f172a;
    border-radius: 2px;
}

/* ===== Search Box ===== */
.search-box {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #f1f5f9;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.search-box:focus-within {
    background: #fff;
    border-color: #e2e8f0;
}

.search-box input {
    padding: 0.4rem 0.4rem;
    border: none;
    background: transparent;
    font-size: 0.88rem;
    width: 180px;
    outline: none;
    color: #0f172a;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.search-box button {
    padding: 0.4rem 0.9rem;
    background: #0f172a;
    border: none;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
    transition: background 0.2s ease;
}

.search-box button:hover {
    background: #2563eb;
}

/* ===== Mobile Menu Button ===== */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #334155;
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.mobile-menu-btn:active {
    transform: scale(0.97);
}

/* ===== Mobile Menu ===== */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    max-width: 85%;
    height: 100vh;
    background: #fff;
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 60px rgba(0,0,0,0.08);
}

.mobile-menu-panel.active {
    right: 0;
}

.mobile-menu-header {
    padding: 1.2rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.mobile-menu-close:active { color: #334155; }

.mobile-menu-nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.mobile-menu-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1.4rem;
    color: #334155;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.mobile-menu-nav a:active {
    background: #f8fafc;
    border-left-color: #0f172a;
    color: #0f172a;
}

.mobile-menu-nav a.active {
    border-left-color: #0f172a;
    color: #0f172a;
    background: rgba(15, 23, 42, 0.04);
}

.mobile-menu-nav .menu-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.mobile-menu-search {
    padding: 1.2rem;
    border-top: 1px solid #f1f5f9;
}

.mobile-menu-search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f1f5f9;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
}

.mobile-menu-search-box input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
}

.mobile-menu-search-box button {
    padding: 0.35rem 0.9rem;
    background: #0f172a;
    border: none;
    border-radius: 999px;
    color: #fff;
    font-size: 0.82rem;
    cursor: pointer;
}

/* ===== Main Content ===== */
main { min-height: 300px; }

/* ===== Back to Top Button ===== */
.back-to-top {
    display: none;
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0f172a;
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 999;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
}

.back-to-top:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* ===== Footer ===== */
.site-footer {
    background: #0b1020;
    color: rgba(148, 163, 184, 0.7);
    padding: 3.5rem 2rem 2rem;
    margin-top: 0;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3.5rem;
    margin-bottom: 3.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
}

.footer-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.footer-logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

.footer-desc {
    font-size: 0.88rem;
    line-height: 1.85;
    margin-bottom: 1.4rem;
    color: rgba(148, 163, 184, 0.65);
    max-width: 360px;
}

.footer-social {
    display: flex;
    gap: 0.6rem;
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
}

.footer-social a:hover {
    background: rgba(59, 130, 246, 0.25);
    transform: translateY(-2px);
}

.footer-col h4 {
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.3rem;
    letter-spacing: -0.005em;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.65rem;
}

.footer-col ul li a {
    color: rgba(148, 163, 184, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.25s ease;
}

.footer-col ul li a:hover {
    color: #93c5fd;
}

.footer-col .contact-item {
    font-size: 0.85rem;
    margin-bottom: 0.7rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: rgba(148, 163, 184, 0.7);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 1.8rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.82rem;
    color: rgba(148, 163, 184, 0.5);
    margin-bottom: 0.4rem;
}

.footer-bottom a {
    color: rgba(148, 163, 184, 0.5);
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-bottom a:hover {
    color: #93c5fd;
}

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

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header .subtitle {
    font-size: 0.78rem;
    font-weight: 600;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    margin-bottom: 1.1rem;
    display: inline-block;
    padding: 0.3rem 0.95rem;
    background: rgba(37, 99, 235, 0.06);
    border-radius: 999px;
}

.section-header h2 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: #0f172a;
    color: #fff;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    color: #0f172a;
    border-color: #cbd5e1;
    background: #f8fafc;
}

.text-center { text-align: center; }

.hidden { display: none !important; }

.visible { display: block !important; }

/* ===== Page Header (for inner pages) ===== */
.page-header {
    background: #fff;
    padding: 5rem 2rem 3rem;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.page-header .container { max-width: 1200px; margin: 0 auto; }

.page-header h1 {
    font-size: 2.6rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.03em;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.page-header .subtitle {
    font-size: 0.85rem;
    color: #64748b;
    letter-spacing: 0.08em;
    font-weight: 300;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .container { padding: 0 1.5rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
    .site-header { padding: 0.7rem 1rem; }
    .site-header.scrolled { padding: 0.55rem 1rem; }
    .header-container { flex-wrap: nowrap; gap: 0.5rem; }
    .main-nav { display: none; }
    .search-box { display: none; }
    .user-info-desktop { display: none !important; }
    .logo { font-size: 1.1rem; }
    .logo-icon { width: 30px; height: 30px; font-size: 0.95rem; }
    .mobile-menu-btn { display: flex; }
    .container { padding: 0 1rem; }
    .section-header h2 { font-size: 1.9rem; }
    .site-footer { padding: 3.5rem 1rem 1.5rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2.2rem; }
    .page-header { padding: 4rem 1rem 2.5rem; }
    .page-header h1 { font-size: 2rem; }
}
