/* === 05. SHELL I MENU GLOWNE ============================================== */

/* --- 05.1 Shell, menu glowne i wspolne ekrany --- */
#shell-layer {
    position: absolute;
    inset: 0;
    z-index: 80;
    overflow: hidden;
    background: #030303;
}

.shell-view {
    position: absolute;
    inset: 0;
    display: none;
    padding: 32px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.shell-view.active {
    display: flex;
}

#main-menu-view::after,
#onboarding-view::after,
#character-hub-view::after,
#class-select-view::after,
#dice-view::after,
#merge-view::after,
#map-view::after,
body.battle-active #game-container::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1920px;
    height: 960px;
    background: transparent url("../image/ui/frame.png") center / 1920px 960px no-repeat;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 20000;
}

.shell-button {
    padding: 0;
    text-transform: none;
    color: #f6dfad;
    text-shadow: 0 2px 0 #000, 0 0 8px rgba(0,0,0,.85);
    font-family: var(--font-title);
    font-weight: 700;
    letter-spacing: .08em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.shell-button.danger {
    color: #ffe1d0;
}

.main-menu-title {
    position: absolute;
    top: -156px;
    left: 50%;
    width: 480px;
    height: 256px;
    overflow: hidden;
    color: transparent;
    font-size: 1px;
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow: none;
    background: transparent url("../image/ui/logo.png") center / 480px 256px no-repeat;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 2;
}

#main-menu-view {
    padding: 0;
    justify-content: flex-start;
    background-image: url("../image/bg/menu.png");
    background-size: 1920px 1080px;
}

.main-menu-box,
.auth-shell-panel {
    border: 0;
    box-shadow: none;
}

.main-menu-box {
    position: relative;
    width: 960px;
    height: 640px;
    min-height: 640px;
    margin-top: 220px;
    padding: 122px 72px 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background: transparent url("../image/ui/window_wide.png") center / 960px 640px no-repeat;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.auth-input-label {
    display: none;
}

.auth-shell-panel {
    position: relative;
    width: 820px;
    max-width: 820px;
    margin-top: 0;
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-tab-row {
    width: 692px;
    display: grid;
    grid-template-columns: 312px 256px;
    gap: 128px;
    margin-bottom: 12px;
    transform: none;
}

.auth-tab {
    color: #f0dcc0;
    text-transform: none;
    letter-spacing: .05em;
    font-family: var(--font-title);
    font-size: 18px;
    text-shadow: 0 1px 0 rgba(0,0,0,.85);
    pointer-events: none;
}

.auth-message {
    position: absolute;
    left: 18px;
    top: 256px;
    z-index: 5;
    width: 348px;
    margin-bottom: 0;
    padding: 11px 14px;
    border: 1px solid rgba(197,160,89,.26);
    font-size: 12px;
    line-height: 1.45;
    color: #e9d3ab;
    background: rgba(13,10,8,.82);
    text-align: left;
    font-family: var(--font-body);
    transform: none;
    pointer-events: none;
}

.auth-message[data-variant="success"] {
    border-color: rgba(79, 180, 94, .48);
    color: #d7f0cd;
}

.auth-message[data-variant="error"] {
    border-color: rgba(185, 77, 77, .52);
    color: #ffd8d1;
}

.auth-message[data-variant="warning"] {
    border-color: rgba(197,160,89,.42);
    color: #f2deb8;
}

.auth-form {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    width: 384px;
    height: 410px;
    opacity: .72;
    filter: brightness(.78) saturate(.85);
    transition: opacity .18s ease, filter .18s ease;
}

.auth-form.active {
    display: flex;
    opacity: 1;
    filter: none;
}

.auth-card-state {
    width: 820px;
    display: grid;
    grid-template-columns: 384px 384px;
    justify-content: center;
    align-items: flex-start;
    gap: 36px;
    transform: translateY(-16px);
}

.auth-card-state[hidden] {
    display: none;
}

#auth-login-form.active,
#auth-register-form.active {
    display: flex;
}

#auth-register-form.active {
    width: 384px;
}

#auth-register-form .auth-submit-button {
    margin-top: auto;
}

.auth-terms-row {
    position: absolute;
    left: 28px;
    top: 288px;
    width: 328px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #e9d3ab;
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 18px;
    z-index: 1;
    text-align: left;
}

#auth-register-terms {
    appearance: none;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    border: 1px solid #b59861;
    background: #160f09;
    position: relative;
}

#auth-register-terms:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid #efd397;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

#auth-register-terms:focus-visible,
.auth-terms-row a:focus-visible {
    outline: 2px solid #efd397;
    outline-offset: 3px;
}

.auth-terms-row a { color: #efd397; text-decoration: underline; text-underline-offset: 2px; }
.auth-terms-row a:hover { color: #fff0cb; }

.auth-input-frame {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 384px;
    height: 96px;
    min-height: 96px;
    margin-top: 14px;
    padding: 0;
    background: transparent url("../image/ui/input.png") center / 384px 96px no-repeat;
    text-align: left;
}

.auth-input-frame + .auth-input-frame {
    margin-top: -34px;
}

.auth-input {
    width: 318px;
    border: 0;
    outline: none;
    background: transparent;
    color: #e9d3ab;
    font-size: 19px;
    line-height: 1;
    font-family: var(--font-title);
    text-align: center;
    text-shadow: none;
    padding: 0;
    transform: translateY(2px);
}

.auth-input::placeholder {
    color: #e9d3ab73;
    text-align: center;
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #a6835b;
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: 0 0 0px 1000px transparent inset;
}

.auth-submit-button {
    position: absolute;
    left: 0;
    bottom: 0;
    margin-top: auto;
    padding: 0 26px;
    font-size: 18px;
    line-height: 1;
}

.auth-card-state--logged {
    width: 760px;
    display: block;
    text-align: center;
}

.main-menu-footer {
    position: absolute;
    left: 50%;
    bottom: -28px;
    width: 620px;
    color: #d9c4a1;
    font-family: var(--font-body);
    font-size: 14px;
    text-align: center;
    text-shadow: 0 2px 0 rgba(0,0,0,.9);
    transform: translateX(-50%);
}

.auth-account-title {
    margin-bottom: 12px;
    color: #f1d59a;
    font-family: var(--font-title);
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-shadow: 0 2px 0 rgba(0,0,0,.82);
}

.auth-account-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-account-card {
    padding: 12px 14px;
    border: 1px solid rgba(197,160,89,.24);
    background: rgba(8,6,5,.78);
    min-height: 68px;
}

.auth-account-card span {
    display: block;
    margin-bottom: 5px;
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #a99571;
}

.auth-account-card strong {
    display: block;
    font-size: 18px;
    line-height: 1.2;
    color: #f4e0b5;
}

.auth-account-card small {
    display: block;
    margin-top: 4px;
    color: #ccb889;
    font-size: 11px;
}


#class-list {
    padding: 0;
    overflow: hidden;
}
