@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
    --bg-image-light: url('/assets/background.jpg');
    --bg-image-dark: url('/assets/background-night.png');
    --text-primary: #ffffff;
    --text-secondary: #d1d1d1;
    --card-background: rgba(25, 28, 36, 0.4);
    --border-color: rgba(255, 255, 255, 0.15);
    --code-bg: rgba(0, 0, 0, 0.35);
    --link-bg: rgba(255, 255, 255, 0.1);
    --link-bg-hover: rgba(255, 255, 255, 0.2);
    --status-online: #2ecc71;
    --status-offline: #e74c3c;
    --status-loading: #f39c12;
    --progress-bar-bg: rgba(255, 255, 255, 0.1);
}

body.light-theme {
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --card-background: rgba(255, 255, 255, 0.45);
    --border-color: rgba(0, 0, 0, 0.15);
    --code-bg: rgba(0, 0, 0, 0.08);
    --link-bg: rgba(0, 0, 0, 0.05);
    --link-bg-hover: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.15);
    --bg-image: var(--bg-image-light);
    --progress-bar-bg: rgba(0, 0, 0, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; background-color: #000; }
body { display: grid; grid-template-rows: 1fr auto; min-height: 100%; font-family: 'Noto Sans SC', sans-serif; color: var(--text-primary); background-color: transparent; transition: color 0.4s ease; }
.content-wrapper { display: flex; justify-content: center; align-items: center; padding: 2rem 1rem; overflow-y: auto; }
footer { text-align: center; padding: 1.5rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.5); user-select: none; }
body.light-theme footer { color: rgba(0, 0, 0, 0.5); }

#background-vignette { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; overflow: hidden; }
#background-image { position: absolute; width: 110vw; height: 110vh; top: -5vh; left: -5vw; background-image: var(--bg-image); background-size: cover; background-position: center; filter: blur(10px); transition: transform 0.3s ease-out, filter 0.8s ease-out, background-image 0.8s ease; }
body.loaded #background-image { filter: blur(4px); }
body.loaded .server-card:hover ~ #background-vignette #background-image { filter: blur(8px); }

#page-loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; z-index: 1000; transition: opacity 0.5s ease, visibility 0.5s ease; background-color: rgba(0,0,0,0.2); }
#page-loader.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }
.progress-bar-wrapper { width: 80%; max-width: 300px; height: 8px; background-color: var(--progress-bar-bg); border-radius: 4px; overflow: hidden; }
#progress-bar { width: 0%; height: 100%; background-color: var(--text-primary); border-radius: 4px; transition: width 0.4s ease-out; }

.server-card { transition: opacity 0.5s ease; }
body.is-loading .server-card { opacity: 0; visibility: hidden; }

.server-card { width: 100%; max-width: 520px; background: var(--card-background); backdrop-filter: blur(16px) saturate(120%); -webkit-backdrop-filter: blur(16px) saturate(120%); border-radius: 24px; border: 1px solid var(--border-color); box-shadow: 0 8px 32px var(--shadow-color); position: relative; transition: all 0.4s ease; overflow: hidden; }
.server-card:hover { box-shadow: 0 12px 45px var(--shadow-color); }
.card-header { text-align: center; padding: 2.5rem 2rem 2rem; text-shadow: 0 2px 10px rgba(0,0,0,0.4); }
.card-header h2 { font-size: 1.6rem; font-weight: 500; line-height: 1.5; }
.card-body { padding: 0 1.5rem 2.5rem; }
.info-section { position: relative; padding: 1.5rem 0 1.5rem 2.5rem; border-left: 2px solid var(--border-color); margin-left: 12px; }
.card-body .info-section:first-child { padding-top: 0; }
.info-section:last-child { padding-bottom: 0; }
.section-title { display: flex; align-items: center; margin-bottom: 1rem; position: relative; }
.section-title .icon { position: absolute; left: -42px; top: 0; color: var(--text-secondary); transition: color 0.4s ease; }
.section-title h3 { font-size: 1.25rem; font-weight: 500; }
.section-content p { position: relative; font-size: 1rem; line-height: 1.8; color: var(--text-secondary); transition: color 0.4s ease;}
.section-content p strong { color: var(--text-primary); font-weight: 500; transition: color 0.4s ease;}
.section-content code { background-color: var(--code-bg); padding: 3px 8px; border-radius: 6px; font-family: 'Menlo', 'Consolas', monospace; font-size: 0.95em; transition: background-color 0.4s ease;}
.copy-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: none; border-radius: 6px; color: var(--text-secondary); cursor: pointer; width: 32px; height: 32px; display: inline-flex; justify-content: center; align-items: center; opacity: 0.5; transition: opacity 0.2s ease, background-color 0.2s ease; }
.section-content p:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: rgba(255,255,255,0.2); }
body.light-theme .copy-btn { background: rgba(0,0,0,0.08); }
body.light-theme .copy-btn:hover { background: rgba(0,0,0,0.15); }
.status-line { display: flex; align-items: center; margin-bottom: 0.5rem; }
.status-line:last-child { margin-bottom: 0; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; transition: background-color 0.5s ease; flex-shrink: 0; }
.status-line.loading .status-dot { background-color: var(--status-loading); }
.status-line.online .status-dot { background-color: var(--status-online); }
.status-line.offline .status-dot { background-color: var(--status-offline); }
.status-players { margin-left: 8px; font-size: 0.9em; color: var(--text-secondary); }
.status-detail { margin-left: 8px; font-size: 0.9em; color: var(--text-secondary); }
.link-button { display: block; width: 100%; background-color: var(--link-bg); color: var(--text-primary); text-align: center; padding: 14px; margin-bottom: 0.8rem; border-radius: 12px; text-decoration: none; font-size: 1rem; font-weight: 500; transition: background-color 0.2s ease, transform 0.2s ease, color 0.4s ease; }
.link-button:last-child { margin-bottom: 0; }
.link-button:hover { background-color: var(--link-bg-hover); transform: translateY(-2px); }

.top-right-controls { position: absolute; top: 20px; right: 20px; display: flex; gap: 0.5rem; z-index: 10; }
#home-button, #theme-switcher { width: 38px; height: 38px; background-color: var(--link-bg); border-radius: 50%; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: background-color 0.2s ease, transform 0.2s ease; color: var(--text-primary); text-decoration: none; }
#home-button:hover, #theme-switcher:hover { background-color: var(--link-bg-hover); transform: scale(1.1); }
#theme-switcher svg, #home-button .material-icons { color: var(--text-primary); transition: color 0.4s ease; }

@media (min-width: 768px) { .server-card { max-width: 760px; } .content-wrapper { padding: 3rem 2rem; } .card-header h2 { font-size: 1.8rem; } .card-body { padding: 0 2.5rem 3rem; } }
@media (max-height: 500px) and (orientation: landscape) { .content-wrapper { padding: 1rem; } .card-header { padding: 1.5rem 1rem; } .card-header h2 { font-size: 1.2rem; } .card-body { padding: 0 1rem 1.5rem; } .section-title h3 { font-size: 1.1rem; } .section-content p { font-size: 0.9rem; } .link-button { padding: 12px; } footer { padding: 1rem; font-size: 0.75rem; } }