/* --- Base and Variables --- */
:root {
    --main-color: rgb(255, 134, 74);
    --text-primary: #333;
    --text-secondary: #666;
    --text-tertiary: #999;
    --background-color: #f5f7fb;
    --white-color: #fff;
    --border-color: #eaeaea;
    --skeleton-color: #e0e0e0;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Disable user selection and long-press actions for an app-like feel */
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

* { box-sizing: border-box; }
a { text-decoration: none; color: inherit; }

/* --- Main Layout --- */
.App {
    max-width: 768px;
    margin: 0 auto;
    background-color: var(--white-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.AppHeader_container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    height: 58px;
    background-color: var(--white-color);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}
.AppHeader_logo { height: 28px; }
.AppHeader_accountIcon .material-symbols-outlined {
    font-size: 28px;
    color: var(--main-color);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    padding: 4px;
}

.Page_container {
    padding-bottom: 16px;
    flex-grow: 1; /* Make sure content pushes footer down */
}

/* --- Banner Carousel --- */
.banner-carousel-container {
    position: relative;
    width: 100%;
    margin-top: -1px; /* Overlap border */
}

.banner-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.banner-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1; /* Base z-index */
}

.banner-slide.is-active {
    opacity: 1;
    z-index: 2; /* Active slide on top */
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-progress {
    position: absolute;
    bottom: 8px;
    left: 16px;
    right: 16px;
    display: flex;
    gap: 4px;
    height: 4px;
    z-index: 3;
}
.progress-bar-container {
    flex-grow: 1;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    overflow: hidden;
}
.progress-bar-inner {
    width: 0%;
    height: 100%;
    background-color: var(--white-color);
    border-radius: 2px;
}
@keyframes progress {
    from { width: 0%; }
    to { width: 100%; }
}

/* --- Tabs --- */
.Page_tabs {
    display: flex;
    background-color: #f0f0f0;
    border-radius: 25px;
    padding: 4px;
    margin: 16px;
}
.Page_tabItem {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    border: none;
    background-color: transparent;
    border-radius: 21px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight */
    position: relative;
    overflow: hidden;
}
.Page_tabItem.is-active {
    background-color: var(--main-color);
    color: var(--white-color);
    font-weight: 700;
}
.Page_tabItem .material-symbols-outlined { font-size: 20px; }

/* --- Section Header --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 16px 16px;
}
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
}
.section-title .material-symbols-outlined { color: var(--main-color); font-size: 24px;}
.section-more {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 8px;
    margin-right: -8px;
    border-radius: 8px;
}
.section-more .material-symbols-outlined { font-size: 16px; }

/* --- Event List --- */
.event-list-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 16px;
    margin-bottom: 40px; /* Space above footer */
}
.event-card {
    background-color: var(--white-color);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
}
.event-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f0f0f0;
    position: relative; /* For badge positioning */
}
.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.event-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--white-color);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
}
.event-card-content { padding: 12px; }
.event-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.4;
    height: 2.8em; /* 2 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.event-card-date, .event-card-venue {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 4px 0;
}
.event-card-date .material-symbols-outlined,
.event-card-venue .material-symbols-outlined {
    font-size: 16px;
}
.event-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--main-color);
    margin-top: 8px;
}
.no-events {
    grid-column: 1 / -1; /* Span full width */
    text-align: center;
    padding: 40px 0;
}
.no-events img {
    width: 150px;
    margin-bottom: 16px;
}
.no-events p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* --- Footer --- */
.Footer_container {
    text-align: center;
    padding: 24px 16px;
    background-color: var(--white-color);
}
.Footer_links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 5px;
}
.Footer_links a {
    color: rgb(153, 153, 153);
    font-size: 12px;
    position: relative;
    overflow: hidden;
    padding: 4px;
}
.Footer_links a:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -10px;
    color: rgb(204, 204, 204);
}
.Footer_logo {
    height: 24px;
    opacity: 0.5;
}


/* --- Ripple Effect --- */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-animation 600ms linear;
    background-color: rgba(0, 0, 0, 0.1);
}
.Page_tabItem.is-active .ripple {
    background-color: rgba(255, 255, 255, 0.3);
}
.AppHeader_accountIcon .ripple, .event-card .ripple {
    background-color: rgba(255, 134, 74, 0.2);
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}


/* --- Skeleton Loader --- */
.skeleton-loader { padding-bottom: 16px; }
@keyframes skeleton-loading {
    0% { background-color: var(--skeleton-color); }
    100% { background-color: #f0f0f0; }
}
.skeleton-header { height: 58px; }
.skeleton-banner { height: 215px; }
.skeleton-tabs { height: 50px; border-radius: 25px; margin: 16px; }
.skeleton-section-header { height: 24px; width: 150px; margin: 0 16px 16px; border-radius: 4px;}
.skeleton-content { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 16px;}
.skeleton-card { height: 300px; border-radius: 12px; }

