/* 頁面主要區塊佈局 */
.hero-container {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1.5rem 4rem;
    background-image: url('../image/background.jpg');
    overflow: hidden;
}

.hero-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 70%, rgba(74, 222, 128, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(34, 211, 238, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.025;
    z-index: 1;
    pointer-events: none;
}

/* Hero 包裝器 - 簡潔布局 */
.hero-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    max-width: 700px;
    width: 100%;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 左側 ICON 區域 - 圓形 */
.hero-icon-section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.server-icon-container {
    width: 120px;
    height: 120px;
}

.server-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* 右側內容區域 */
.hero-content {
    flex: 1;
}

/* 標題 */
.page-heading {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

/* 伺服器詳細資訊 */
.server-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* IP 列 */
.server-ip-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.server-ip {
    flex: 1;
    font-family: 'Segoe UI', monospace;
    font-size: 1rem;
    font-weight: 500;
    color: #4ade80;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 複製按鈕 */
.copy-btn {
    padding: 0.5rem 0.75rem;
    background: #0078d4;
    color: #fff;
    font-weight: 600;
    font-size: 0.8125rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #106ebe;
}

/* 版本列 */
.server-version-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.version-label {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

.version-value {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
}

/* 在線狀態 */
.server-status-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.server-links-row {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.other-server-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.1));
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 6px;
    color: #ff6b6b;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.other-server-link:hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(255, 107, 107, 0.2));
    transform: translateY(-2px);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #107c10;
}

.status-indicator.offline {
    background: #d13438;
}

.status-text {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
}

.online-count {
    color: #107c10;
    font-weight: 600;
}

.hero-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(74, 222, 128, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(34, 211, 238, 0.12) 0%, transparent 50%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    flex: 1;
    max-width: 420px;
}

.hero-overlay {
    display: none;
}
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.story-container {
    max-width: 56rem;
    margin: 0 auto;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #4ade80 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #4ade80, #22d3ee);
    border-radius: 2px;
    margin: 0.75rem auto 0;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

/* 主要內容容器 - 自適應寬度 */
.main-container {
    max-width: 1400px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 4vw, 3rem);
    padding-right: clamp(1rem, 4vw, 3rem);
    padding-top: clamp(3rem, 8vw, 5rem);
    padding-bottom: clamp(3rem, 8vw, 5rem);
    background: #0f172a;
}

@media (max-width: 900px) {
    .main-container {
        max-width: 100%;
    }
}

/* 區段間距 - 自適應 */
.section {
    margin-bottom: clamp(3rem, 10vw, 7rem);
    padding: clamp(1.5rem, 5vw, 3rem);
    text-align: center;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.8) 0%, rgba(31, 41, 55, 0.6) 100%);
    border-radius: clamp(16px, 4vw, 24px);
    border: 1px solid rgba(74, 222, 128, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.section-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.about-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: left;
}

html[lang="ja"] .section-title,
html[lang="ko"] .section-title {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
}

html[lang="ja"] .about-text,
html[lang="ko"] .about-text {
    font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Hero 區域自適應 */
.hero-container {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 100vh;
    min-height: clamp(600px, 100vh, 900px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(5rem, 12vw, 8rem) clamp(1rem, 4vw, 2rem) clamp(2rem, 6vw, 4rem);
    background-image: url('../image/background.jpg');
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: clamp(1.5rem, 5vw, 3rem) clamp(1.25rem, 4vw, 2.5rem);
    border-radius: clamp(16px, 4vw, 24px);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.85) 0%, rgba(31, 41, 55, 0.75) 100%);
    border: 1px solid rgba(74, 222, 128, 0.2);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: clamp(300px, 90vw, 720px);
    width: 100%;
    margin: 0 clamp(0.5rem, 2vw, 1rem);
    animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 標題自適應 */
.section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 800;
    background: linear-gradient(135deg, #4ade80 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: clamp(1.25rem, 4vw, 2rem);
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
    letter-spacing: -0.02em;
}

.page-heading {
    font-size: clamp(2rem, 6vw, 3.25rem);
}

.section:hover {
    border-color: rgba(74, 222, 128, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
}

.section:last-child {
    margin-bottom: 0;
}

/* 頁尾樣式 */
.site-footer {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, #0f172a 100%);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding-top: 4rem;
    padding-bottom: 3rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    margin-top: auto;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.3), transparent);
}

/* 頁尾標題 */
.footer-heading {
    display: none;
}

/* 社群連結容器 */
.social-links-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 0 1rem;
    max-width: 100%;
}

/* 頁尾版權資訊 */
.copyright-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1.5rem;
    letter-spacing: 0.05em;
}

.maintained-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 0.5rem;
}

/* 側邊欄樣式 */
.sidebar-toggle {
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 1001;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(31, 41, 55, 0.95));
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 14px;
    padding: 0.85rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.sidebar-toggle:hover {
    background: linear-gradient(135deg, rgba(31, 41, 55, 1), rgba(17, 24, 39, 1));
    transform: scale(1.08);
    border-color: rgba(74, 222, 128, 0.6);
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.3);
}

.hamburger-line {
    width: 1.75rem;
    height: 2.5px;
    background: linear-gradient(90deg, #4ade80, #22d3ee);
    transition: all 0.3s ease;
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.6);
}

/* 當側邊欄開啟時隱藏選單按鈕 */
.sidebar-toggle.active {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.sidebar {
    position: fixed;
    top: 0;
    left: -20rem;
    width: 20rem;
    height: 100vh;
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    z-index: 1000;
    transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.6);
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid rgba(74, 222, 128, 0.1);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(74, 222, 128, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.sidebar-header h3 {
    background: linear-gradient(135deg, #4ade80, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.sidebar-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #9ca3af;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    line-height: 1;
}

.sidebar-close:hover {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    transform: rotate(90deg);
}

.sidebar-nav {
    flex: 1;
    padding: 1.25rem 0;
    list-style: none;
    margin: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-link {
    display: block;
    padding: 1rem 1.5rem;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
    position: relative;
    font-size: 1rem;
}

.sidebar-link:hover {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.2), transparent);
    color: #4ade80;
    border-left-color: #4ade80;
    padding-left: 2rem;
    letter-spacing: 0.5px;
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.25), transparent);
    color: #4ade80;
    border-left-color: #4ade80;
}

/* 外部連結樣式 */
.sidebar-link.external-link {
    position: relative;
    border-top: 1px solid rgba(74, 222, 128, 0.1);
    margin-top: 0.75rem;
    padding-top: 1.25rem;
}

.sidebar-link.external-link:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.sidebar-link.external-link::after {
    content: "↗";
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #4ade80;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.sidebar-link.external-link:hover::after {
    opacity: 1;
    right: 1rem;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

.sidebar-section-title {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(74, 222, 128, 0.15);
    background: rgba(0, 0, 0, 0.3);
}

.sidebar-social-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.sidebar-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.8), rgba(31, 41, 55, 0.8));
    color: #d1d5db;
    text-decoration: none;
    text-align: center;
    border-radius: 12px;
    font-size: 0;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.sidebar-social-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.sidebar-social-link:hover {
    background: linear-gradient(135deg, #4ade80, #22d3ee);
    color: #111827;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 222, 128, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 響應式設計 - 自適應佈局 */
@media (max-width: 768px) {
    .sidebar {
        width: 85%;
        max-width: 320px;
        left: -85%;
    }

    .sidebar-toggle {
        top: 1rem;
        left: 1rem;
        padding: 0.7rem;
    }

    .hamburger-line {
        width: 1.4rem;
        height: 2.5px;
    }

    .main-container {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .section {
        margin-bottom: 3rem;
        padding: 2rem 1.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .site-footer {
        padding-top: 3rem;
        padding-bottom: 2rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .social-links-container {
        gap: 1rem;
    }

    .footer-heading {
        font-size: 1rem;
    }
}

/* 平板布局 */
@media (max-width: 900px) {
    .hero-container {
        padding: 5rem 1rem 3rem;
    }

    .hero-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .server-icon-container {
        width: clamp(120px, 30vw, 180px);
        height: clamp(120px, 30vw, 180px);
    }

    .hero-content {
        max-width: 100%;
        width: 100%;
    }

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

    .server-info-flex {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 1.75rem 1.25rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .server-icon-container {
        width: 100px;
        height: 100px;
    }
}

/* 當側邊欄開啟時，防止背景滾動 */
body.sidebar-open {
    overflow: hidden;
}