:root {
    --main-color: #FF7886;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.4;
    letter-spacing: 0.04em;
    position: relative;
}

/* 背景裝飾元素 */
.bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}


.bg-circle-1 {
    position: absolute;
    top: -100px;
    left: -140px;
    width: 340px;
    height: 340px;
}

.bg-circle-2 {
    position: absolute;
    top: 120px;
    right: -200px;
    width: 360px;
    height: 360px;
}


.bg-star-1 {
    position: absolute;
    top: 30px;
    left: 100px;
    width: 16px;
    height: 16px;
}

.bg-star-2 {
    position: absolute;
    top: 55px;
    right: 95px;
    width: 14px;
    height: 14px;
}

.bg-star-3 {
    position: absolute;
    top: 120px;
    right: 25px;
    width: 16px;
    height: 16px;
}

.bg-star-4 {
    position: absolute;
    top: 180px;
    left: 70px;
    width: 16px;
    height: 16px;
}

.bg-star-5 {
    position: absolute;
    top: 210px;
    right: 70px;
    width: 16px;
    height: 16px;
}

.bg-dot-1 {
    position: absolute;
    top: 20px;
    right: 40px;
    width: 6px;
    height: 6px;
}

.bg-dot-2 {
    position: absolute;
    top: 100px;
    left: 40px;
    width: 6px;
    height: 6px;
}

.bg-dot-3 {
    position: absolute;
    top: 180px;
    right: 20px;
    width: 6px;
    height: 6px;
}

.bg-dot-4 {
    position: absolute;
    top: 220px;
    left: 20px;
    width: 6px;
    height: 6px;
}

/* Color Classes */
.gray-700 {
    color: #424242;
}

.gray-500 {
    color: #909090;
}

.main-color {
    color: var(--main-color);
}

.blue{
    color: #1DA6D0;
}

/* Font Size Classes */
.f-12 {
    font-size: 12px;
}

.f-14 {
    font-size: 14px;
}

.f-16 {
    font-size: 16px;
}

.f-18 {
    font-size: 18px;
}

.f-20 {
    font-size: 20px;
}

.f-24 {
    font-size: 24px;
}

.f-28 {
    font-size: 28px;
}

.f-36 {
    font-size: 36px;
}

/* Font Weight Classes */
.regular {
    font-weight: 400;
}

.medium {
    font-weight: 500;
}

.bold {
    font-weight: 700;
}

.mt-1{
    margin-top: 4px;
}

.mb-1{
    margin-bottom: 4px;
}

.app-container {
    max-width: 560px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* 上方區塊：Header + Summary + Navigation */
.top-section {
    flex-shrink: 0;
    position: relative;
}

/* 下方區塊：內容區域 */
.content-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 當歷程紀錄太長時，tab 置頂 */
.content-section .nav-tabs {
    position: sticky;
    top: 0;
    background-color: #f0f0f0;
    z-index: 100;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* 當 tab 置頂時變為白色 */
.content-section .nav-tabs.sticky {
    background-color: f0f0f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: -20px;
    position: relative;
    z-index: 5;
    margin-top: 32px;
}

.title-image {
    height: auto;
    width: auto;
    object-fit: contain;
    margin-bottom: 8px;
}

/* Summary Card */
.summary-card {
    background: white;
    border-radius: 12px;
    padding: 72px 20px 20px 20px;
    margin-top: 90px;
    margin-bottom: 12px;
    box-shadow: 2px 2px 8px 0 rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: visible;
    gap: 20px;
}

.summary-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.badge-info {
    width: 100%;
    text-align: center;
}

.progress-section {
    display: flex;
    align-items: center;
    align-self: stretch;
}

.progress-bar {
    width: 100%;
    height: 18px;
    background-color: #DCDCDC;
    border-radius: 18px 0 0 18px;
    overflow: visible;
    position: relative;
    padding-right: 20px;
    box-sizing: border-box;
}

.progress-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    flex-shrink: 0;
}

.progress-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 48px;
    max-height: 48px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background-color: var(--main-color);
    border-radius: 18px 0 0 18px;
    transition: width 0.3s ease;
}

.badge-icon {
    position: absolute;
    top: -124px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.badge-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 200px;
    max-height: 200px;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    margin-bottom: 16px;
    position: sticky;
    top: 0;
    background-color: #f0f0f0;
    z-index: 100;
    padding-top: 8px;
}

.tab {
    flex: 1;
    padding: 10px 0;
    background: none;
    border: none;
    font-size: 17px;
    letter-spacing: 0.1em;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.tab.active {
    color: var(--main-color);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--main-color);
    border-radius: 1px 1px 0 0;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Coupon Cards */
.coupon-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coupon-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    box-shadow: 2px 2px 8px 0 rgba(0, 0, 0, 0.08);

}

.coupon-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coupon-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.coupon-notice{
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.req-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    text-align: center;
    gap: 2px;
}

.small-badge-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.redeem-btn {
    padding: 10px 14px;
    width: 92px;
    border: none;
    letter-spacing: 0.06em;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.redeem-btn.enabled {
    background-color: var(--main-color);
    color: white;
}

.redeem-btn.disabled {
    background-color: #EDEDED;
    color: #A6A6A6;
}

/* History Tab */
.history-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 2px 2px 8px 0 rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    gap: 4px;
}

.history-top{
    display: flex;
    justify-content: space-between;
}

.history-bottom{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}
.history-badge{
    text-align: center;
    width: 72px;
}

.history-card .history-badge.positive {
    color:var(--main-color);
}

.history-card .history-badge.negative {
    color: #1DA6D0;
}

/* 空畫面樣式 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
}

/* 彈窗樣式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 320px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.25);
}

.modal-icon {
    margin-bottom: 16px;
}

.modal-text {
    margin-bottom: 24px;
}

.modal-title {
    font-size: 18px;
    font-weight: 500;
    color: #424242;
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 16px;
    color: #71747A;
    line-height: 1.4;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.confirm-btn {
    background-color: var(--main-color);
    color: white;
}

.cancel-btn {
    background-color: white;
    color: #71747A;
}