/* App layout - header & footer */

.app-header {
    position: relative;
    z-index: 40;
    background: linear-gradient(180deg, rgba(12, 2, 30, 0.98) 0%, rgba(8, 2, 22, 0.96) 100%);
    border-bottom: 1px solid rgba(188, 19, 254, 0.55);
    box-shadow: 0 4px 24px rgba(188, 19, 254, 0.18);
}

.app-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    min-height: 3.35rem;
    max-width: 480px;
    margin: 0 auto;
    padding: 0.4rem 0.65rem;
}

.app-header__lead,
.app-header__tools {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.app-header__tools {
    margin-left: auto;
}

.app-header__brand {
    font-size: 1.35rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.02em;
    line-height: 1;
    color: #fff;
    text-decoration: none;
    text-shadow: 0 0 12px rgba(188, 19, 254, 0.85), 0 2px 0 rgba(88, 28, 135, 0.8);
}

.app-header__icon-btn {
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    border-radius: 0.7rem;
    border: 1px solid rgba(188, 19, 254, 0.65);
    background: linear-gradient(180deg, rgba(76, 29, 149, 0.55), rgba(12, 2, 28, 0.85));
    color: #fff;
    box-shadow: 0 0 12px rgba(188, 19, 254, 0.28), inset 0 0 8px rgba(188, 19, 254, 0.15);
    cursor: pointer;
}

.app-header__icon-btn svg {
    width: 1.15rem;
    height: 1.15rem;
}

.app-header__icon-btn svg.is-spin {
    animation: mx-spin 0.8s linear infinite;
}

.app-header__bell {
    position: relative;
}

.app-header__dot {
    position: absolute;
    top: 0.22rem;
    right: 0.22rem;
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(12, 2, 28, 0.9), 0 0 8px #ef4444;
}

.app-notice {
    width: 16.5rem;
    max-height: 22rem;
    overflow: auto;
    color: #fff;
    background: linear-gradient(180deg, rgba(18, 4, 42, 0.98) 0%, rgba(8, 2, 22, 0.99) 100%);
    border: 1px solid rgba(188, 19, 254, 0.55);
    border-radius: 0.85rem;
    box-shadow: 0 0 24px rgba(188, 19, 254, 0.3);
}

.app-notice__head {
    position: sticky;
    top: 0;
    padding: 0.7rem 0.85rem;
    font-weight: 800;
    background: rgba(18, 4, 42, 0.98);
    border-bottom: 1px solid rgba(188, 19, 254, 0.25);
}

.app-notice__empty {
    margin: 0;
    padding: 1rem 0.85rem 1.1rem;
    color: rgba(233, 213, 255, 0.75);
    font-size: 0.85rem;
}

.app-notice ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.app-notice li {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid rgba(188, 19, 254, 0.15);
}

.app-notice b {
    font-size: 0.88rem;
}

.app-notice li span {
    color: #e9d5ff;
    font-size: 0.8rem;
}

.app-notice small {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.72rem;
}

@keyframes mx-spin {
    to { transform: rotate(360deg); }
}

.app-header__pill {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
    max-width: 11.5rem;
    padding: 0.18rem 0.28rem 0.18rem 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(188, 19, 254, 0.7);
    background: linear-gradient(180deg, rgba(49, 10, 90, 0.95), rgba(12, 2, 28, 0.95));
    box-shadow: 0 0 14px rgba(188, 19, 254, 0.28);
}

.app-header__pill-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.05;
}

.app-header__pill-copy span {
    color: rgba(233, 213, 255, 0.72);
    font-size: 0.58rem;
}

.app-header__pill .app-header__coin {
    width: 1.25rem;
    height: 1.25rem;
}

.app-header__pill-copy strong,
.app-header__pill-wait {
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-header__pill .mx-wallet__icon-btn {
    width: 1.15rem !important;
    height: 1.15rem !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff;
}

.app-header__credit {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding-left: 0.5rem;
    padding-right: 0.25rem;
}

.app-header__coin {
    width: 1.75rem;
    height: 1.75rem;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.45));
}

.app-header__balance {
    margin-left: 0.25rem;
    margin-top: 0.15rem;
    color: #f3e8ff;
    font-size: 0.95rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(188, 19, 254, 0.45);
    white-space: nowrap;
}

.app-header__loader {
    margin-top: 0.15rem;
}

.app-header__loader circle {
    fill: #d946ff;
    stroke: #d946ff;
}

.app-header__logo-wrap {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-header__logo {
    max-width: 100px;
    margin-top: 0.35rem;
    filter: drop-shadow(0 0 12px rgba(188, 19, 254, 0.5));
    transition: filter 0.2s ease;
}

.app-header__logo:hover {
    filter: drop-shadow(0 0 18px rgba(188, 19, 254, 0.7));
}

.app-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding-right: 0.35rem;
}

.app-header__menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-top: 0.35rem;
    padding: 0;
    border: 1px solid rgba(188, 19, 254, 0.55);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(75, 0, 130, 0.45) 0%, rgba(0, 0, 0, 0.45) 100%);
    box-shadow: 0 0 10px rgba(188, 19, 254, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.app-header__menu-btn:hover {
    border-color: #d946ff;
    box-shadow: 0 0 14px rgba(188, 19, 254, 0.35);
}

.app-header__menu-btn img {
    width: 1.35rem;
    height: 1.35rem;
    object-fit: contain;
}

.app-header__dropdown {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 230px;
    overflow: hidden;
    font-weight: 600;
    background: linear-gradient(180deg, rgba(18, 4, 42, 0.98) 0%, rgba(8, 2, 22, 0.99) 100%);
    border: 1px solid rgba(188, 19, 254, 0.55);
    border-radius: 10px;
    box-shadow: 0 0 24px rgba(188, 19, 254, 0.3);
}

.app-header__dropdown > li > a,
.app-header__dropdown > li > .router-link-active {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.app-header__dropdown > li > a:hover {
    background: rgba(138, 43, 226, 0.25);
    color: #fff;
}

.app-header__dropdown-profile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(188, 19, 254, 0.25);
}

.app-header__dropdown-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(188, 19, 254, 0.45);
}

.app-header__dropdown-name {
    margin: 0;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.app-header__dropdown-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: rgba(50, 205, 50, 0.2);
    border: 1px solid rgba(50, 205, 50, 0.45);
    color: #86efac;
    font-size: 0.65rem;
    font-weight: 600;
}

.app-header__dropdown-credit {
    color: rgba(233, 213, 255, 0.85);
    font-size: 0.8rem;
    text-decoration: none;
}

.app-header__dropdown-divider {
    border-top: 1px solid rgba(188, 19, 254, 0.25) !important;
}

.app-header__dropdown-logout {
    color: #f87171 !important;
}

.app-header__dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

:root {
    --app-footer-offset: 6.6rem;
}

/* space for capsule footer */
.app-page.mb-\[70px\] {
    margin-bottom: var(--app-footer-offset) !important;
}

.home-layout {
    padding-bottom: calc(var(--app-footer-offset) + 0.5rem) !important;
}

/* Footer — floating neon bar */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    width: 100%;
    max-width: 100%;
    padding: 1.7rem 0.7rem 0.45rem;
    background: transparent;
    pointer-events: none;
    overflow: visible;
}

.app-footer__wrap {
    max-width: 480px;
    margin: 0 auto;
    pointer-events: auto;
}

.app-footer__bar {
    position: relative;
    padding: 0.55rem 0.35rem 0.4rem;
    border-radius: 1.35rem;
    overflow: visible;
    background:
        radial-gradient(ellipse at 50% 120%, rgba(168, 85, 247, 0.45) 0%, transparent 46%),
        linear-gradient(180deg, rgba(46, 12, 92, 0.98) 0%, rgba(18, 4, 40, 0.98) 100%);
    border: 2px solid rgba(216, 180, 254, 0.85);
    box-shadow:
        0 0 0 1px rgba(88, 28, 135, 0.8),
        0 0 18px rgba(168, 85, 247, 0.55),
        0 8px 22px rgba(0, 0, 0, 0.45),
        inset 0 0 18px rgba(168, 85, 247, 0.22);
}

.app-footer__bar::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 1.1rem;
    border: 1px solid rgba(233, 213, 255, 0.18);
    pointer-events: none;
}

.app-footer__bar::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -0.55rem;
    width: 7.5rem;
    height: 1.15rem;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(192, 132, 252, 0.85) 0%, rgba(168, 85, 247, 0.15) 55%, transparent 72%);
    filter: blur(1px);
    pointer-events: none;
}

.app-footer__nav {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    gap: 0.15rem;
    min-height: 3.25rem;
}

.app-footer__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    min-width: 0;
}

.app-footer__item:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);
}

.app-footer__item:active {
    transform: translateY(0) scale(0.96);
}

.app-footer__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.55rem;
    height: 2.15rem;
    border-radius: 0.7rem;
    background: linear-gradient(180deg, rgba(76, 29, 149, 0.35), rgba(12, 2, 28, 0.55));
    border: 1px solid rgba(216, 180, 254, 0.8);
    box-shadow: inset 0 0 10px rgba(168, 85, 247, 0.28), 0 0 8px rgba(168, 85, 247, 0.25);
}

.app-footer__icon svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #f5e9ff;
    filter: drop-shadow(0 0 6px rgba(188, 19, 254, 0.55));
}

.app-footer__crown {
    position: absolute;
    top: -0.85rem;
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    color: #fbbf24;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.85));
}

.app-footer__crown svg {
    width: 1.15rem;
    height: 1.15rem;
}

.app-footer__home {
    grid-column: 3;
    justify-self: center;
    align-self: start;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.15rem;
    height: 4.15rem;
    margin-top: -2.05rem;
    padding: 0;
    border: 2px solid #f3e8ff;
    border-radius: 50%;
    cursor: pointer;
    background:
        radial-gradient(circle at 50% 38%, rgba(192, 132, 252, 0.45) 0%, transparent 46%),
        linear-gradient(180deg, #3b0764 0%, #1a0533 100%);
    box-shadow:
        0 0 0 5px rgba(147, 51, 234, 0.35),
        0 0 22px rgba(192, 132, 252, 0.85),
        0 10px 16px rgba(0, 0, 0, 0.4),
        inset 0 0 14px rgba(216, 180, 254, 0.25);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.app-footer__home::before {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    border: 1px solid rgba(216, 180, 254, 0.45);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.55);
    pointer-events: none;
}

.app-footer__home::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -0.72rem;
    width: 2.4rem;
    height: 0.55rem;
    transform: translateX(-50%);
    border-radius: 0 0 1rem 1rem;
    background: linear-gradient(180deg, rgba(88, 28, 135, 0.2), rgba(168, 85, 247, 0.85));
    box-shadow: 0 6px 12px rgba(168, 85, 247, 0.55);
    pointer-events: none;
}

.app-footer__home:hover {
    filter: brightness(1.1);
    box-shadow:
        0 0 24px rgba(217, 70, 255, 0.55),
        0 0 48px rgba(138, 43, 226, 0.25),
        inset 0 0 16px rgba(138, 43, 226, 0.2);
}

.app-footer__home:active {
    transform: scale(0.96);
}

.app-footer__home-text {
    position: relative;
    z-index: 1;
    font-size: 0.72rem;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 0.04em;
    color: #f3e8ff;
    text-shadow:
        0 0 10px rgba(217, 70, 255, 0.8),
        0 0 20px rgba(188, 19, 254, 0.4);
}

.app-footer__label {
    margin: 0;
    color: #f3e8ff;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(188, 19, 254, 0.45);
}

@media (min-width: 400px) {
    .app-footer__bar {
        padding: 0.6rem 0.5rem 0.45rem;
    }

    .app-footer__icon {
        width: 2.7rem;
        height: 2.25rem;
    }

    .app-footer__icon svg {
        width: 1.35rem;
        height: 1.35rem;
    }

    .app-footer__home {
        width: 4.45rem;
        height: 4.45rem;
        margin-top: -2.2rem;
    }

    .app-footer__home-text {
        font-size: 0.78rem;
    }

    .app-footer__label {
        font-size: 0.68rem;
    }
}

@media (min-width: 768px) {
    .app-footer__wrap {
        max-width: 520px;
    }
}

.app-footer__modal-panel {
    position: relative;
    width: 100%;
    max-width: 32rem;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(18, 4, 42, 0.96) 0%, rgba(8, 2, 22, 0.98) 100%);
    border: 2px solid rgba(188, 19, 254, 0.75);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(188, 19, 254, 0.35);
    color: #fff;
}

.app-footer__modal-header {
    padding: 0.85rem 3rem 0.85rem 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #e9d5ff;
    border-bottom: 1px solid rgba(188, 19, 254, 0.35);
}

.app-footer__modal-body {
    padding: 1rem 1.25rem 1.25rem;
}

.app-footer__modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.app-footer__modal-close:hover {
    color: #fff;
}

.app-footer__promo-name {
    text-align: center;
    color: #e9d5ff;
    font-weight: 700;
    margin: 0.5rem 0;
}

.app-footer__promo-detail {
    padding: 0.85rem;
    border: 1px solid rgba(188, 19, 254, 0.45);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.9);
    white-space: pre-line;
}

.app-footer__promo-limit {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    margin: 0.65rem 0;
}

.app-footer__turn-panel {
    padding: 1rem;
    border: 1px solid rgba(188, 19, 254, 0.45);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(75, 0, 130, 0.35) 0%, rgba(0, 0, 0, 0.35) 100%);
    box-shadow: inset 0 0 16px rgba(138, 43, 226, 0.1);
}

.app-footer__turn-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fbbf24;
}

.app-footer__turn-value--success {
    color: #4ade80;
}

.app-footer__turn-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}

.app-footer__progress {
    width: 100%;
    height: 1.1rem;
    padding: 0.15rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(188, 19, 254, 0.35);
    overflow: hidden;
}

.app-footer__progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #4b0082 0%, #8a2be2 45%, #bc13fe 100%);
    box-shadow: 0 0 10px rgba(188, 19, 254, 0.45);
}

.app-footer__progress-text {
    margin-left: 0.75rem;
    color: #e9d5ff;
    font-weight: 600;
}

.mx-mine__empty {
    margin: 1.4rem 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.mx-mine__name {
    margin: 0 0 0.75rem;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 800;
    color: #f5d78e;
}

.mx-mine__detail {
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(245, 215, 142, 0.28);
    background: rgba(0, 0, 0, 0.28);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.86rem;
    line-height: 1.55;
    white-space: pre-line;
}

.mx-mine__limit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.7rem 0;
    padding: 0.65rem 0.8rem;
    border-radius: 12px;
    background: rgba(245, 215, 142, 0.1);
    border: 1px solid rgba(245, 215, 142, 0.28);
}

.mx-mine__limit span {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
}

.mx-mine__limit strong {
    font-size: 0.92rem;
    color: #f5d78e;
}

.mx-mine__turns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.mx-mine__turns div {
    padding: 0.75rem 0.55rem;
    border-radius: 14px;
    text-align: center;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(251, 191, 36, 0.28);
}

.mx-mine__turns .is-done {
    border-color: rgba(74, 222, 128, 0.35);
}

.mx-mine__turns strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1.15;
    font-weight: 800;
    color: #fbbf24;
}

.mx-mine__turns .is-done strong {
    color: #4ade80;
}

.mx-mine__turns span {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.68);
}

.mx-mine__bar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.mx-mine__bar-track {
    flex: 1;
    height: 0.7rem;
    padding: 0.12rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(188, 19, 254, 0.35);
    overflow: hidden;
}

.mx-mine__bar-fill {
    height: 100%;
    min-width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #6d28d9 0%, #c026d3 55%, #f0abfc 100%);
    box-shadow: 0 0 10px rgba(192, 38, 211, 0.45);
}

.mx-mine__bar em {
    flex-shrink: 0;
    font-style: normal;
    font-size: 0.82rem;
    font-weight: 800;
    color: #f5d0fe;
}
