/* ===========================================================================
   PUBLIC SHELL (pre-login pages) — v2 design language.
   Linked ONLY from templates/layout.php. Self-contained: does not depend on
   styles.css (which is shared with the admin panel and screenshot viewer).

   Tokens mirror the in-game v2 look:
     panel  : linear-gradient(180deg, rgba(16,37,68,.x), rgba(6,16,32,.x))
     border : rgba(82,148,225,.26)
     accent : #7cc7ff (blue headers / CTA)
   =========================================================================== */

* { box-sizing: border-box; }

body.public {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #05080f url(../img/sterne_bg2.jpg) repeat;
    color: #d5e3f4;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

body.public a {
    color: #84bdff;
    text-decoration: none;
}
body.public a:hover {
    color: #eef8ff;
}

.site {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    flex: 1 0 auto;
}

/* ---- Top bar -------------------------------------------------------------- */
.site__bar {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 22px 0 18px;
    border-bottom: 1px solid rgba(82, 148, 225, .22);
}

.site__brand {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #e9f5ff !important;
    white-space: nowrap;
    text-shadow: 0 0 18px rgba(74, 152, 235, .24);
}
.site__brand b {
    color: #62b2ff;
    font-weight: 800;
}

.site__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}
.site__nav a,
.site__nav .is-active {
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    color: #b7c8de;
}
.site__nav a:hover {
    background: rgba(76, 143, 219, .14);
    color: #eef8ff;
}
.site__nav .is-active {
    color: #e5f5ff;
    background: rgba(74, 152, 235, .18);
}

.site__lang {
    display: flex;
    align-items: center;
    gap: 8px;
}
.site__lang img {
    display: block;
    border: 1px solid rgba(82, 148, 225, .36);
    border-radius: 3px;
}
.site__lang a:hover img {
    border-color: #ffffff;
}
.site__lang span {
    display: inline-flex;
}

/* ---- Hero (home only) ----------------------------------------------------- */
.site__hero {
    padding: 56px 16px 40px;
    text-align: center;
}
.site__hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 60px);
    font-weight: 800;
    letter-spacing: 1px;
    color: #e8f5ff;
    text-shadow: 0 4px 28px rgba(0, 0, 0, .64), 0 0 36px rgba(64, 148, 238, .22);
}
.site__hero p {
    margin: 0 auto 30px;
    max-width: 640px;
    font-size: clamp(15px, 2.4vw, 19px);
    color: #b9cbe0;
}

/* ---- Buttons -------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    text-align: center;
    transition: filter .15s ease, transform .05s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--cta {
    font-size: 16px;
    padding: 14px 34px;
    color: #f7fbff !important;
    background: linear-gradient(180deg, #78c5ff 0%, #2477d7 54%, #14539c 100%);
    border-color: rgba(126, 202, 255, .55);
    box-shadow: 0 12px 28px rgba(15, 88, 172, .34), inset 0 1px 0 rgba(255, 255, 255, .22);
    text-shadow: 0 1px 0 rgba(0, 25, 62, .55);
}
.btn--cta:hover {
    filter: brightness(1.08);
    color: #ffffff !important;
    box-shadow: 0 14px 34px rgba(22, 112, 211, .42), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--block { display: block; width: 100%; }

/* ---- Main grid: content + login ------------------------------------------ */
.site__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
    padding: 30px 0 44px;
}

/* ---- Panels --------------------------------------------------------------- */
.panel {
    border: 1px solid rgba(82, 148, 225, .26);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(16, 37, 68, .96), rgba(6, 16, 32, .96));
    box-shadow: 0 18px 42px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(165, 212, 255, .06);
    overflow: hidden;
}
.panel__title {
    padding: 14px 22px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .4px;
    color: #dff1ff;
    background: linear-gradient(180deg, rgba(35, 78, 126, .72), rgba(13, 36, 68, .76));
    border-bottom: 1px solid rgba(82, 148, 225, .28);
}
.panel__body {
    padding: 22px;
}
.panel__body h2 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #eef7ff;
}
.panel__body p { margin: 0 0 14px; }

/* ---- Feature list (home) -------------------------------------------------- */
.features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}
.features li {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(82, 148, 225, .18);
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(9, 25, 46, .78), rgba(4, 14, 28, .68));
}
.features .features__icon {
    position: relative;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(101, 172, 244, .36);
    border-radius: 6px;
    background: rgba(37, 105, 180, .16);
    font-size: 0;
    line-height: 0;
}
.features .features__icon::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 2px;
    width: 7px;
    height: 12px;
    border-right: 2px solid #75bdff;
    border-bottom: 2px solid #75bdff;
    transform: rotate(45deg);
}
.features b { color: #edf7ff; display: block; margin-bottom: 2px; }
.features span { color: #aabbd0; font-size: 13px; }

/* ---- Login card ----------------------------------------------------------- */
.login {
    position: sticky;
    top: 18px;
    border-color: rgba(94, 169, 244, .34);
}
.login__field {
    margin-bottom: 14px;
}
.login__field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #8ea3ba;
}
.login__input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    color: #eef7ff;
    background: rgba(3, 13, 27, .92);
    border: 1px solid rgba(82, 148, 225, .32);
    border-radius: 6px;
    outline: none;
}
.login__input:focus {
    border-color: #62b2ff;
    box-shadow: 0 0 0 2px rgba(98, 178, 255, .18);
}
.login__uni {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    font-size: 15px;
    color: #dfeeff;
    background: rgba(3, 13, 27, .68);
    border: 1px dashed rgba(82, 148, 225, .38);
    border-radius: 6px;
    cursor: default;
}
.login__uni .login__lock {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #62b2ff;
    box-shadow: 0 0 0 3px rgba(98, 178, 255, .12);
    font-size: 0;
    color: transparent;
}
.login__hint {
    margin-top: 4px;
    font-size: 11px;
    color: #748aa3;
}
.login__submit { margin-top: 6px; }
.login__links {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(82, 148, 225, .18);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.login__links a { cursor: pointer; }

/* ---- Register form -------------------------------------------------------- */
.reg-form { display: grid; gap: 14px; }
.reg-form__field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #8ea3ba;
}
.reg-form__field input[type="text"],
.reg-form__field input[type="password"],
.reg-form__field select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    color: #eef7ff;
    background: rgba(3, 13, 27, .92);
    border: 1px solid rgba(82, 148, 225, .32);
    border-radius: 6px;
    outline: none;
}
.reg-form__field input:focus,
.reg-form__field select:focus {
    border-color: #62b2ff;
    box-shadow: 0 0 0 2px rgba(98, 178, 255, .18);
}
.reg-form__agb {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #c2d2e5;
}
.reg-status { min-height: 20px; font-size: 13px; }
.reg-status .warning { color: #ff7876; }
.reg-status .fine { color: #6ee787; }
.reg-info { font-size: 13px; color: #aabbd0; min-height: 18px; }

/* ---- Long-form content (about / story / rules) --------------------------- */
.prose p { margin: 0 0 14px; }
.prose strong { color: #eef7ff; }
.prose img {
    border: 1px solid rgba(82, 148, 225, .28);
    border-radius: 6px;
    max-width: 40%;
    height: auto;
}
.prose .img-right { float: right; margin: 0 0 12px 16px; }
.prose .img-left  { float: left;  margin: 0 16px 12px 0; }
.prose .lead {
    font-size: 16px;
    color: #eef7ff;
    font-weight: 700;
}
.prose .cta-link {
    display: inline-block;
    margin-top: 8px;
    font-weight: 700;
    color: #75bdff;
}
.prose::after { content: ""; display: block; clear: both; }
.rules-text {
    color: #cbdced;
    font-size: 13px;
    line-height: 1.55;
}

/* ---- Universes list ------------------------------------------------------- */
.uni-list { display: grid; gap: 10px; }
.uni-list a {
    display: block;
    padding: 12px 16px;
    border: 1px solid rgba(82, 148, 225, .18);
    border-radius: 6px;
    background: rgba(5, 18, 36, .68);
    color: #d5e3f4;
}
.uni-list a:hover { border-color: #62b2ff; color: #ffffff; }
.uni-note { color: #8ea3ba; font-size: 13px; margin: 0 0 16px; }

/* ---- Screenshots ---------------------------------------------------------- */
.shots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.shots-grid figure { margin: 0; }
.shots-grid img {
    width: 100%;
    height: auto;
    border: 1px solid rgba(82, 148, 225, .28);
    border-radius: 6px;
    display: block;
}
.shots-grid a:hover img { border-color: #62b2ff; }
.shots-head {
    margin: 4px 0 14px;
    font-size: 16px;
    color: #75bdff;
    font-weight: 700;
}

/* ---- Auth card (recover form / result) ----------------------------------- */
.auth-narrow { max-width: 520px; margin: 40px auto; }

/* ---- Footer --------------------------------------------------------------- */
.site__footer {
    flex-shrink: 0;
    padding: 22px 24px;
    text-align: center;
    font-size: 12px;
    color: #748aa3;
    border-top: 1px solid rgba(82, 148, 225, .16);
}
.site__footer a { color: #8ea3ba; }

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 880px) {
    .site__grid { grid-template-columns: 1fr; }
    .login { position: static; }
    .site__nav { margin-left: 0; width: 100%; }
    .prose img { max-width: 50%; }
}
@media (max-width: 560px) {
    .site__bar { justify-content: center; text-align: center; }
    .site__lang { margin-left: auto; }
    .prose .img-right, .prose .img-left { float: none; display: block; margin: 0 0 12px; max-width: 100%; }
}
