/* Shared visual language for public pages and account workspaces. */
:root {
  color-scheme: dark;
  --nova-bg: #000;
  --nova-surface: rgba(17, 34, 51, .94);
  --nova-line: rgba(111, 178, 204, .4);
  --nova-ink: #ddd;
  --nova-muted: #b8bcc5;
  --nova-accent: #8bd4ed;
}
html[data-site-theme="midnight"] { --nova-bg: #010205; --nova-surface: rgba(5, 10, 20, .86); }
html[data-site-theme="nebula"] { --nova-bg: #0b0314; --nova-surface: rgba(23, 10, 39, .82); --nova-line: rgba(192, 132, 252, .4); }
body {
  font-family: 'Orbitron', Arial, sans-serif;
  color: var(--nova-ink);
  background: var(--nova-bg);
  line-height: 1.6;
}
/* Dense, local star textures keep the original space atmosphere even offline. */
body .stars {
  background: var(--nova-bg) url('images/nova-stars.svg') repeat;
  opacity: .38;
  filter: none;
  pointer-events: none;
}
body .twinkling {
  background: url('images/nova-twinkle.svg') repeat;
  opacity: .18;
  animation: none;
  pointer-events: none;
}
h1, h2, h3 { line-height: 1.25; letter-spacing: normal; }
p, li { overflow-wrap: break-word; }
main a:not(.btn):not(.download-action) { color: var(--nova-accent); }
main a:hover { text-decoration-thickness: 2px; text-underline-offset: 4px; }
input, select, textarea, button { font: inherit; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea {
  box-sizing: border-box;
  max-width: 100%;
  border-radius: 9px;
  min-height: 44px;
}
button, .btn, .download-action { min-height: 44px; box-sizing: border-box; }
button:disabled { cursor: wait; }
button:disabled, a[aria-disabled="true"] { opacity: .65; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #ffd58c;
  outline-offset: 4px;
}
.site-header {
  min-height: 76px;
  background: rgba(8, 14, 29, .96);
  border-bottom: 1px solid var(--nova-line);
  box-shadow: 0 3px 14px #4fc3f72b;
}
.site-brand { color: #89bfd2; letter-spacing: normal; text-shadow: none; }
.site-brand img { width: 36px; height: 36px; }
.site-nav a, .site-menu-trigger, .site-account-trigger { font-weight: 600; min-height: 44px; box-sizing: border-box; }
.site-nav a { display: inline-flex; align-items: center; }
.site-nav a, .site-menu-trigger, .site-account-trigger { color: #c4c8ce; }
.site-footer { background: rgba(10, 10, 13, .95); border-color: var(--nova-line); padding: 28px 16px; }
.site-footer p { color: var(--nova-muted); }
.site-footer .site-legal-links { margin-top: 12px; }
.panel, .task-card, .certificate-panel, .download-card, .server-card {
  border-color: var(--nova-line);
  background-color: var(--nova-surface);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 #8bdfff0a, 0 8px 28px #0003;
}
.page-intro p, .task-card p { color: var(--nova-muted); }
.panel h2, .task-card h2, .certificate-panel h2 { color: #9bb9c4; }
.task-card { transition: border-color .18s, transform .18s; }
.task-card:hover { border-color: #4fc3f780; box-shadow: 0 0 22px #4fc3f714; transform: translateY(-2px); }
.field-label { display: block; text-align: left; color: #d4e3f3; font-size: .88rem; font-weight: 600; margin: 14px 0 5px; }
.auth-page .container {
  background: var(--nova-surface);
  border: 1px solid var(--nova-line);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px #0005;
}
.auth-page h1 { color: #c5d6dc; text-shadow: none; font-size: clamp(1.65rem, 4vw, 2rem); }
.auth-page form input:not([type="checkbox"]) { width: 100%; margin: 0 0 6px; padding: 12px 14px; border: 1px solid #49627b; background: #0c0c10; color: var(--nova-ink); }
.auth-page form button, .auth-page .google-btn { width: 100%; min-height: 48px; border-radius: 10px; }
.auth-page form button { margin-top: 18px; }
.auth-page form button:not(.google-btn):not(.danger-btn) { background: #7dc6e0; color: #07151d; font-weight: 600; }
.auth-page .legal-consent { width: 100%; }
.auth-page .field-label { margin-top: 12px; }
.auth-page .switch-container { font-size: .9rem; }
.auth-page .switch-btn { width: auto; min-height: 44px; }
.auth-page .auth-page-navigation { margin-bottom: 24px; }
.auth-page [role="alert"] { line-height: 1.5; }
.auth-page .auth-intro { color: var(--nova-muted); font-size: .95rem; margin: -8px 0 20px; }
.google-mark { color: #4285f4; font: 700 20px/1 Arial, sans-serif; }
.home-page main { margin-top: 0; }
.home-page .hero {
  display: grid; grid-template-columns: 1.25fr 1fr; align-items: center;
  gap: 48px; text-align: left; max-width: 1120px; margin: 0 auto;
  padding: 80px 28px 64px; box-sizing: border-box;
}
.home-page .hero h1 { color: #d5d5da; font-size: clamp(2.3rem, 4.5vw, 3.6rem); font-weight: 600; line-height: 1.15; margin: 18px 0 24px; max-width: 650px; letter-spacing: normal; }
.home-page .hero h1 span { color: #89bfd2; text-shadow: none; }
.home-page .subtitle { color: var(--nova-muted); font-size: 1.1rem; line-height: 1.7; margin: 0 0 28px; max-width: 560px; }
.home-page .eyebrow { color: #c5ae85; font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.home-page .buttons { padding: 0; margin: 0; justify-content: flex-start; gap: 12px; }
.home-page .btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 22px; border: 1px solid transparent; }
.home-page .btn.primary { background: #deb16a; color: #161108; box-shadow: none; }
.home-page .btn.primary:hover { background: #ddbc80; box-shadow: none; }
.home-page .btn.secondary { color: #07151d; border-color: #7dc6e0; background: #7dc6e0; }
.home-page .btn.secondary:hover { background: #a1d8eb; color: #07151d; box-shadow: none; }
.home-page .download-status-card { margin: 24px 0 0; padding: 9px 12px; border-color: var(--nova-line); background: #0e1015; }
.home-page .hero .download-status-label { font-size: .8rem; font-weight: 600; }
.home-page .download-status-message { font-size: .75rem; }
.home-page .world-art { width: 100%; max-width: 440px; justify-self: center; filter: none; }
.home-page .hero-note { color: #96adc7; font-size: .78rem; margin: 16px 0 0; }
.home-page .features { text-align: left; max-width: 1120px; box-sizing: border-box; margin: 0 auto; padding: 38px 28px; }
.home-page .features h2 { margin: 8px 0 24px; font-size: clamp(1.65rem, 3vw, 2.2rem); }
.home-page .feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.home-page .feature { box-sizing: border-box; width: auto; min-width: 0; padding: 28px; border: 1px solid var(--nova-line); background: var(--nova-surface); border-radius: 16px; backdrop-filter: blur(8px); box-shadow: 0 0 22px #4fc3f70a; transition: border-color .2s, box-shadow .2s; }
.home-page .feature:hover { border-color: #4fc3f780; box-shadow: 0 0 28px #4fc3f720; }
.home-page .feature h3 { color: #a9dcec; margin: 0 0 12px; font-size: 1.15rem; }
.home-page .feature p { color: var(--nova-muted); margin: 0; font-size: .95rem; }
.home-page .feature a { display: inline-block; margin-top: 18px; font-weight: 600; }
.home-page .feature-number { display: inline-block; color: #171109; background: #deb16a; padding: 4px 8px; border-radius: 5px; font: 600 .8rem ui-monospace, monospace; margin-bottom: 24px; }
.home-page .support-section { margin: 36px auto 72px; padding: 36px; border: 1px solid var(--nova-line); border-radius: 20px; background: rgba(21, 37, 53, .95); backdrop-filter: blur(8px); box-shadow: none; width: calc(100% - 56px); }
.home-page .support-section .subtitle { max-width: 700px; }
.home-page .nova-visual-secret { max-width: 32px; width: 32px; right: 12px; }
.workspace-tabs [aria-selected="true"] { background: #7dc6e0; color: #07151d; border-color: #7dc6e0; }
.world-visual { position: relative; width: 100%; }
.world-visual .world-art { display: block; }
.planet-render { position: absolute; left: 20.91%; top: 20.91%; width: 58.18%; height: 58.18%; border-radius: 50%; pointer-events: none; }
.planet-render[hidden] { display: none; }
/* Lighting stays fixed while the surface turns within the planet silhouette. */
.world-scene { width: 100%; max-width: 440px; justify-self: center; text-align: center; }
.planet-surface, .planet-orbit, .planet-satellite { transform-origin: 220px 220px; }
.planet-surface { animation: planet-turn 100s linear infinite; }
.planet-orbit { animation: planet-turn 60s linear infinite; }
.planet-satellite { animation: planet-turn 110s linear infinite reverse; }
@keyframes planet-turn { to { transform: rotate(360deg); } }
.world-scene.is-paused .planet-surface, .world-scene.is-paused .planet-orbit,
.world-scene.is-paused .planet-satellite { animation-play-state: paused; }
.planet-motion-button { display: inline-block; width: auto; min-height: 36px; padding: 6px 12px; border: 1px solid #3c434a; border-radius: 8px; background: #101014; color: #aeb7bf; font: .8rem Arial, sans-serif; cursor: pointer; }
.planet-motion-button:hover { background: #1a1a1f; color: #d0d7dc; }
.planet-motion-button:disabled { cursor: default; }
@media (max-width: 700px) {
  .home-page .hero { grid-template-columns: 1fr; gap: 22px; padding: 44px 20px 28px; }
  .home-page .world-scene { max-width: 260px; grid-row: 2; }
  .home-page .hero h1 { font-size: clamp(2.1rem, 9vw, 2.8rem); }
  .home-page .features { padding: 28px 20px; }
  .home-page .feature-grid { grid-template-columns: 1fr; }
  .home-page .feature { padding: 24px; }
  .home-page .feature-number { margin-bottom: 16px; }
  .home-page .buttons { flex-wrap: wrap; }
  .home-page .buttons .btn { width: 100%; flex: 0 0 auto; }
  .home-page .support-section { width: calc(100% - 40px); margin: 24px auto 48px; padding: 24px; }
  .site-header { min-height: 68px; }
  .notification { min-width: 0; width: min(350px, calc(100vw - 40px)); box-sizing: border-box; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Homepage: useful game notes and direct navigation. */
.home-page .first-day { background: #8cc8d6; color: #10242c; padding: 30px; border-radius: 4px; border-top: 5px solid #deb16a; box-shadow: 9px 9px 0 #162a35; }
.home-page .field-note { color: #253c44; font-size: .8rem; margin: 0 0 12px; }
.home-page .first-day h2 { color: #10242c; font-size: 1.75rem; margin: 0 0 12px; }
.home-page .first-day-intro { color: #253c44; margin: 0; font-size: .95rem; }
.home-page .survival-notes { list-style: none; padding: 0; margin: 24px 0; }
.home-page .survival-notes li { border-top: 1px solid #10242c38; padding: 14px 0; }
.home-page .survival-notes strong, .home-page .survival-notes span { display: block; }
.home-page .survival-notes span { margin-top: 5px; font-size: .9rem; line-height: 1.55; }
.home-page .first-day a { color: #10242c; text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }
.home-page .home-links { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; border-top: 1px solid var(--nova-line); margin-top: 24px; }
.home-page .play-intro p, .home-page .community-note p { color: var(--nova-muted); line-height: 1.7; }
.home-page .home-link-list a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--nova-line); text-decoration: none; }
.home-page .home-link-list strong { color: #a9dcec; font-size: 1.1rem; }
.home-page .home-link-list small { display: block; color: var(--nova-muted); margin-top: 7px; font-size: .9rem; }
.home-page .home-link-list a:hover strong { text-decoration: underline; }
.home-page .community-note { margin-bottom: 44px; }
.home-page .community-note h2 { font-size: 1.3rem; margin-bottom: 12px; color: #deb16a; }
@media (max-width: 700px) {
 .home-page .first-day { padding: 24px; margin: 12px 9px 8px 0; }
 .home-page .home-links { grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
}

.home-page .hero .first-day .survival-notes span, .home-page .hero .first-day a { color: #10242c !important; }

/* Soft Nova color transitions, concentrated around the content. */
.home-page .hero { position: relative; isolation: isolate; }
.home-page .hero::before { content: ""; position: absolute; inset: 25px -20px 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 78% 48%, #a579b51a, transparent 57%), radial-gradient(ellipse at 14% 65%, #cf954c10, transparent 53%); }
.home-page .hero h1 { color: #bcdce5; background: linear-gradient(110deg, #b6deea 8%, #baa7cf 58%, #dfbc88 95%); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.home-page .first-day { position: relative; background: linear-gradient(135deg, #91ced6 0%, #a5bed8 54%, #b8acd1 100%); border: 1px solid #d8e7ee69; border-top: 4px solid #d7b178; border-radius: 18px 5px 18px 5px; box-shadow: 0 18px 50px #0008, 7px 7px 0 #b59cce18, inset 0 1px 0 #ffffff50; }
.home-page .field-note { display: inline-block; padding: 5px 9px; background: #ffffff2b; border: 1px solid #10242c20; border-radius: 4px; }
.home-page .survival-notes li { padding-left: 15px; position: relative; }
.home-page .survival-notes li::before { content: ""; position: absolute; left: 0; top: 20px; width: 4px; height: 18px; border-radius: 3px; background: #3d6477; }
.home-page .survival-notes li:nth-child(2)::before { background: #7a5a30; }
.home-page .survival-notes li:nth-child(3)::before { background: #65527e; }
.home-page .btn.primary { background: linear-gradient(115deg, #deb16a, #c99b77); border-color: #eed2a14d; }
.home-page .btn.secondary { background: linear-gradient(115deg, #7dc6e0, #a9b9d4); border-color: #c2e4ee69; }
.home-page .btn { transition: transform .18s ease, box-shadow .18s ease; }
.home-page .btn:hover { transform: translateY(-2px); box-shadow: 0 5px 18px #a1cce51a; }
.home-page .home-link-list { display: grid; gap: 10px; }
.home-page .home-link-list a { padding: 19px 20px; border: 1px solid #83bed338; border-radius: 9px; background: linear-gradient(110deg, #173340d9, #262035c4); transition: border-color .2s, transform .2s; }
.home-page .home-link-list a:nth-child(2) { background: linear-gradient(110deg, #352d20db, #292135c4); border-color: #c7a46e38; }
.home-page .home-link-list a:nth-child(3) { background: linear-gradient(110deg, #252137db, #192e37c4); }
.home-page .home-link-list a:hover { border-color: #b5c6dc80; transform: translateX(3px); }
.home-page .community-note { border-left: 3px solid #cda268; background: linear-gradient(105deg, #392d214f, #30213b38 60%, transparent); border-radius: 0 12px 12px 0; margin-top: 30px; }
@media (max-width: 700px) { .home-page .hero::before { inset: 20px 0 0; } }
@media (prefers-reduced-motion: reduce) { .home-page .btn:hover, .home-page .home-link-list a:hover { transform: none; } }

.home-page .home-link-list, .home-page .home-link-list a, .home-page .home-link-list a > span { min-width: 0; }
.home-page .home-link-list a { box-sizing: border-box; overflow-wrap: anywhere; }

.home-page .hero::before { left: 0; right: 0; }

/* Keep Nova colors within a dark, comfortable palette. */
.home-page .first-day { background: linear-gradient(135deg, #173440 0%, #252e43 54%, #352b43 100%); color: #d6dce3; border-color: #91b8ca38; border-top-color: #a98759; box-shadow: 0 18px 45px #0008, 5px 5px 0 #8e759c10, inset 0 1px 0 #c4d9e012; }
.home-page .first-day h2 { color: #c0dae3; }
.home-page .first-day .field-note { color: #c5b18e; background: #00000020; border-color: #bbcadb24; }
.home-page .first-day .first-day-intro { color: #b6becb; }
.home-page .survival-notes li { border-top-color: #b6c6d52b; }
.home-page .survival-notes strong { color: #d0d7df; }
.home-page .hero .first-day .survival-notes span { color: #b6becb !important; }
.home-page .hero .first-day a { color: #a9cedb !important; }
.home-page .survival-notes li::before { background: #7cabbc; }
.home-page .survival-notes li:nth-child(2)::before { background: #b2986e; }
.home-page .survival-notes li:nth-child(3)::before { background: #9d89b2; }
.home-page .hero h1 { background-image: linear-gradient(110deg, #9dc4d1 8%, #a99bbb 58%, #c1a47d 95%); }
.home-page .btn.primary { background: linear-gradient(115deg, #bc975f, #b08d71); border-color: #c9af8740; }
.home-page .btn.secondary { background: linear-gradient(115deg, #75adbf, #949fb9); border-color: #a9c3cf40; }
.home-page .btn.primary:hover { background: linear-gradient(115deg, #c8a36c, #bc997d); }
.home-page .btn.secondary:hover { background: linear-gradient(115deg, #83bacb, #a0abc4); }

/* Long user content must fit without hiding names or widening the page. */
:where(main, .container) :where(h1, h2, h3, h4, p, li, label, a, button, strong, small, span, summary, dt, dd, td, th) { overflow-wrap: anywhere; }
:where(main, .container) :where(section, article, aside, div, form, fieldset) { min-width: 0; }
:where(main, .container) :where(button, a, input, textarea, select) { max-width: 100%; }
:where(main, .container) :where(button, select, textarea, input:not([type="checkbox"]):not([type="radio"])) { min-width: 0; }
:where(main, .container) button { white-space: normal; }
.server-card, .user-card, .certificate-card, .ticket-list-item, .ticket-message { min-width: 0; box-sizing: border-box; }
.server-card .server-url { max-width: 100%; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.message-label, .connected-account { flex-wrap: wrap; }
.message-label > *, .connected-account > *, .attachment-button > span, .selected-file > span { min-width: 0; }
.ticket-message, .attachment-button { max-width: 100%; }
.site-account-menu { max-width: min(320px, calc(100vw - 24px)); box-sizing: border-box; }
.site-account-summary { overflow-wrap: anywhere; }
.home-page .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
@media (max-width: 700px) { .home-page .hero { grid-template-columns: minmax(0, 1fr); } }

main :is(h1,h2,h3,h4,p,li,label,a,button,strong,small,span,summary,dt,dd,td,th), .container :is(h1,h2,h3,h4,p,li,label,a,button,strong,small,span,summary) { overflow-wrap: anywhere; }
main :is(p,h1,h2,h3,h4,label), .container :is(p,h1,h2,h3,h4,label) { min-width: 0; max-width: 100%; box-sizing: border-box; }

main, .container { overflow-wrap: anywhere; }

main > section, main .panel { box-sizing: border-box; max-width: 100%; min-width: 0; }

.hosting-hardware-note { padding: 18px 20px; margin: 22px 0; border: 1px solid #8aabc338; border-left: 3px solid #b29465; border-radius: 9px; background: linear-gradient(115deg, #18313b80, #2b263b80); }
.hosting-hardware-note h3 { margin: 0 0 10px; color: #bad3df; }
.hosting-hardware-note p:last-child { margin-bottom: 0; }
.hardware-guide { margin: 20px 0 32px; }
.hardware-guide p, .hardware-guide li { color: var(--nova-muted); }
.hardware-guide .requirements-grid { margin: 20px 0; }
