:root {
    --ah-bg: #000;
    --ah-surface: #141414;
    --ah-input: #222;
    --ah-pink: #ff2896;
    --ah-text: #fff;
    --ah-muted: #8c8c8c;
    --ah-border: #3a3a3a;
    --ah-pad: 20px;
    --ah-shell-max: 392px;
}

html,
body {
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #111;
    height: 100%;
    min-height: 100%;
    width: auto;
}

#layout-wrapper {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--ah-shell-max);
    min-height: 100vh;
    margin: 0 auto;
    position: relative;
    background: var(--ah-bg);
}

#layout-wrapper > #page-topbar {
    box-sizing: border-box;
    left: 0 !important;
    max-width: 100%;
    position: relative !important;
    right: auto !important;
    width: 100%;
}

@media (min-width: 768px) {
    :root {
        --ah-pad: 24px;
        --ah-shell-max: 820px;
    }
}

#page-topbar {
    background: var(--ah-bg);
    padding: 14px var(--ah-pad) 8px;
}

#page-topbar .topbar-inner {
    align-items: center;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

#page-topbar .topbar-logo {
    display: block;
    height: 28px;
    width: auto;
}

#page-topbar .topbar-actions {
    align-items: center;
    display: flex;
    gap: 16px;
}

#page-topbar .topbar-action {
    align-items: center;
    background: transparent;
    border: 0;
    color: #fff;
    display: inline-flex;
    flex-shrink: 0;
    height: 40px;
    justify-content: center;
    padding: 0;
    width: 40px;
}

#page-topbar .topbar-action img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

#page-topbar .topbar-action i {
    font-size: 22px;
    line-height: 1;
}

.main-content {
    background-color: var(--ah-bg);
    min-height: 100vh;
    height: auto;
}

#layout-wrapper > #page-topbar,
#layout-wrapper > .main-content {
    box-sizing: border-box;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
    width: 100%;
}

/* ========== Activity Home ========== */

.activity-home {
    min-height: 100vh;
    padding-bottom: 120px;
    background: var(--ah-bg);
    color: var(--ah-text);
}

.activity-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px var(--ah-pad) 14px;
    background: var(--ah-bg);
}

.activity-search__field {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    background: var(--ah-input);
}

/* 新 search@2x：灰線稿透明底，略放大以保線條清晰 */
.activity-search__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    object-fit: contain;
    opacity: 1;
}

.activity-search__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--ah-text);
    font-size: 13px;
    outline: none;
}

.activity-search__input::placeholder {
    color: #8c8c8c;
    opacity: 1;
}

.activity-search__filter {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--ah-pink);
    cursor: pointer;
}

.activity-search__filter img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    /* 灰線稿 → 白，貼合粉色按鈕 */
    filter: brightness(0) invert(1);
}

.activity-banner {
    padding: 0;
    background: var(--ah-bg);
}

.activity-banner__frame {
    position: relative;
    overflow: hidden;
    background: var(--ah-bg);
}

.activity-banner__slide {
    position: relative;
    width: 100%;
    aspect-ratio: 390 / 240;
    overflow: hidden;
    background: var(--ah-bg);
}

.activity-banner__slide img {
    display: block;
    width: 100%;
    object-fit: contain;
    object-position: center;
}

.activity-banner__cta {
    position: absolute;
    left: 71.8%;
    top: 77%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23%;
    height: 12%;
    padding: 0 8px;
    border: 0;
    border-radius: 10px;
    background: var(--ah-pink);
    color: #fff;
    font-size: clamp(10px, 2.6vw, 13px);
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}

.activity-banner__cta:hover,
.activity-banner__cta:focus {
    color: #fff;
    background: #ff4aa0;
    text-decoration: none;
}

.activity-banner__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 12px 0 10px;
    background: var(--ah-bg);
}

.activity-banner__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    opacity: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.activity-banner__dot.is-active {
    background: var(--ah-pink);
    transform: scale(1.15);
}

#activityBanner .carousel-inner,
#activityBanner .carousel-item {
    background: var(--ah-bg);
}

.activity-categories {
    padding: 4px var(--ah-pad) 16px;
    background: var(--ah-bg);
}

.activity-categories__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    min-height: 92px;
    padding: 14px 8px 12px;
    overflow-x: auto;
    border-radius: 20px;
    background: var(--ah-surface);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.activity-categories__bar::-webkit-scrollbar {
    display: none;
}

.activity-categories__item {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 2px 1px;
    border: 0;
    background: transparent;
    color: #8c8c8c;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.activity-categories__item--divider {
    margin-left: 4px;
    padding-left: 10px;
}

.activity-categories__item--divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 44px;
    background: #5a5a5a;
    transform: translateY(-50%);
}

/* 新 menu 圖：固定槽位，idle／active 疊放，避免切換時跑版 */
.activity-categories__icon {
    position: relative;
    display: block;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
}

.activity-categories__icon img {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    width: 28px;
    height: 28px;
    margin: 0;
    object-fit: contain;
    transform: translate(-50%, -50%);
}

.activity-categories__icon-img--idle,
.activity-categories__icon-img--active {
    transition: opacity 0.12s ease;
}

.activity-categories__icon-img--active {
    opacity: 0;
    pointer-events: none;
}

.activity-categories__item.is-active .activity-categories__icon-img--idle {
    opacity: 0;
    pointer-events: none;
}

.activity-categories__item.is-active .activity-categories__icon-img--active {
    opacity: 1;
    pointer-events: auto;
}

.activity-categories__label {
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-overflow: ellipsis;
}

.activity-categories__item.is-active {
    color: var(--ah-pink);
}

.activity-upcoming {
    padding: 4px var(--ah-pad) 28px;
    background: var(--ah-bg);
}

.activity-upcoming__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.activity-upcoming__title {
    margin: 0;
    color: var(--ah-text);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.activity-upcoming__more {
    color: var(--ah-text);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.activity-upcoming__more:hover,
.activity-upcoming__more.is-active {
    color: var(--ah-pink);
    text-decoration: none;
}

.activity-upcoming__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.event-card {
    overflow: hidden;
    border: 1px solid var(--ah-border);
    border-radius: 12px;
    background: #000;
}

.event-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.event-card__link:hover {
    color: inherit;
    text-decoration: none;
}

.activity-upcoming__empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 24px 8px;
    color: #9a9a9a;
    font-size: 14px;
    text-align: center;
}

.event-card__media {
    position: relative;
    aspect-ratio: 170 / 100;
    overflow: hidden;
    background: #1a1a1a;
}

.event-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-card__tag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
    color: var(--ah-pink);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.event-card__fav {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.event-card__fav svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.event-card__fav.is-active {
    color: var(--ah-pink);
}

.event-card__fav.is-active svg {
    fill: currentColor;
    stroke: currentColor;
}

.event-card__date {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 16px 0 8px;
    background: linear-gradient(90deg, #d0207a 0%, #ff2896 100%);
    color: #fff;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.event-card__body {
    padding: 10px 10px 12px;
}

.event-card__name {
    margin: 0 0 6px;
    color: var(--ah-text);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.event-card__time,
.event-card__place {
    margin: 0;
    color: var(--ah-text);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
}

.event-card__place {
    margin-top: 3px;
    color: #c8c8c8;
}

@media (min-width: 768px) {
    .activity-upcoming__grid {
        gap: 16px;
    }

    .event-card__name {
        font-size: 14px;
    }

    .activity-search__input {
        font-size: 14px;
    }
}

/* ========== modalMessage（#global_modal）：黑底粉紅強調，對齊 --ah-* ========== */
#global_modal .modal-dialog {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

#global_modal .modal-content {
    border: 1px solid var(--ah-border);
    border-radius: 14px;
    background: var(--ah-surface);
    color: var(--ah-text);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

#global_modal .modal-header {
    border-bottom: 1px solid var(--ah-border);
    padding: 14px 16px 10px;
}

#global_modal .modal-title {
    color: var(--ah-text);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

#global_modal .modal-header .close,
#global_modal .modal-header .btn-close {
    padding: 0;
    margin: 0;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    opacity: 1;
    box-shadow: none;
}

/* Bootstrap btn-close 改白叉 */
#global_modal .modal-header .btn-close {
    background: transparent
        url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e")
        center / 12px auto no-repeat;
}

#global_modal .modal-header .close span,
#global_modal .modal-header .btn-close span {
    display: none;
}

#global_modal .modal-body {
    padding: 18px 16px;
    color: var(--ah-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
}

#global_modal .modal-footer {
    border-top: 1px solid var(--ah-border);
    padding: 12px 16px 16px;
    gap: 10px;
}

#global_modal .modal-footer .btn {
    min-height: 42px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* 確認／OK：粉紅主色 */
#global_modal .modal-footer .btn-ok,
#global_modal .modal-footer .btn-primary {
    border: 0;
    background: var(--ah-pink);
    color: #fff;
}

#global_modal .modal-footer .btn-ok:hover,
#global_modal .modal-footer .btn-ok:focus,
#global_modal .modal-footer .btn-primary:hover,
#global_modal .modal-footer .btn-primary:focus {
    background: #ff4db6;
    color: #fff;
    box-shadow: none;
}

/* 取消：粉紅描邊 */
#global_modal .modal-footer .btn-cancel,
#global_modal .modal-footer .btn-secondary {
    border: 1.5px solid var(--ah-pink);
    background: transparent;
    color: var(--ah-pink);
}

#global_modal .modal-footer .btn-cancel:hover,
#global_modal .modal-footer .btn-cancel:focus,
#global_modal .modal-footer .btn-secondary:hover,
#global_modal .modal-footer .btn-secondary:focus {
    background: rgba(255, 40, 150, 0.12);
    border-color: var(--ah-pink);
    color: var(--ah-pink);
    box-shadow: none;
}

/* 加深遮罩，配合黑底登入頁 */
body.modal-open .modal-backdrop.show {
    background-color: #000;
    opacity: 0.72;
}
