body {
    font-family: "Noto Sans TC", sans-serif;
    background-color: #f3f4f6;
}

.animate-fade-in {
    animation: sales-fade-in 0.32s ease-out;
}

@keyframes sales-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.page-shell {
    padding-bottom: 6rem;
}

.modal-backdrop {
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(6px);
}

/* --- PWA Install Popover Styles (比照 SuperFresh.LIFF wwwroot/css/pages/home.css) --- */

.btn-settings-action {
    background: #E1F5FE;
    color: #009CDE;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-settings-action:hover {
    background: #B3E5FC;
}

#install-pwa-popover {
    width: 92%;
    max-width: 420px;
    border: none;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    padding: 0;
    overflow: hidden;
    background: #fff;
    outline: none;

    /* Manual positioning */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -45%) scale(0.9) !important;
    display: none; /* Controlled by .popover-show */
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, visibility 0.3s ease;
    visibility: hidden;
    margin: 0 !important;
    z-index: 100000 !important;
}

#install-pwa-popover.popover-show {
    display: flex !important;
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* PWA Manual Backdrop */
.pwa-backdrop-manual {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.7) !important;
    backdrop-filter: blur(8px);
    z-index: 99999 !important;
}

.install-pwa-container {
    width: 90vw;
    max-width: 420px;
    background: #fff;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 24px 48px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
}

#pwa-tutorial-view {
    padding: 0;
    width: 100%;
}

.install-pwa-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.install-pwa-close:hover {
    background: #fff;
    transform: rotate(90deg);
}

.install-pwa-header-img {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #0288D1 0%, #00ACC1 100%);
    position: relative;
    overflow: hidden;
}

.install-pwa-header-img svg {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 160px;
    height: 160px;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.install-pwa-content {
    padding: 32px 24px;
}

.install-pwa-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1A1A1A;
    line-height: 1.2;
}

.install-pwa-desc {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 32px;
    color: #666;
}

.install-pwa-features {
    list-style: none;
    padding: 0;
    margin-bottom: 32px;
}

.install-pwa-features li {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 16px;
}

.install-pwa-features li .icon-wrapper {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F0F7FB;
    color: #0288D1;
    border-radius: 12px;
}

.install-pwa-features li .icon-wrapper svg {
    width: 24px;
    height: 24px;
}

.install-pwa-features li span b {
    display: block;
    font-size: 16px;
    color: #1A1A1A;
    margin-bottom: 2px;
}

.install-pwa-btn-container {
    width: 100%;
}

.btn-install {
    background: linear-gradient(135deg, #0288D1 0%, #01579B 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-shadow: 0 10px 20px rgba(2, 136, 209, 0.3);
}

.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(2, 136, 209, 0.4);
}

.btn-install:active {
    transform: translateY(0);
}

/* Tutorial Carousel（加入主畫面教學輪播） */
.tutorial-carousel {
    position: relative;
    height: 420px;
    width: 100%;
    overflow: hidden;
    background: #F9FAFB;
}

.carousel-track-container {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-track {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
    height: 100%;
    transition: transform 450ms cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    width: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
}

.carousel-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #fff;
    border-top: 1px solid #F0F0F0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #E0E0E0;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.carousel-indicator.current-slide {
    background-color: #0288D1;
    width: 24px;
    border-radius: 4px;
}

.carousel-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #444;
}

.carousel-btn:hover {
    background: #eeeeee;
    color: #333;
}

.carousel-btn:active {
    transform: scale(0.95);
    background: #edf2f7;
}

.carousel-btn.is-hidden {
    display: none;
}

.tutorial-footer {
    padding: 24px;
    text-align: center;
    background: #fff;
}

#tutorial-step-text {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
}

/* --- Buttons & Signout Styles (對齊 SuperFresh.LIFF) --- */
.btn {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 32px;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    user-select: none;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-danger {
    background: linear-gradient(135deg, #e53935 0%, #b71c1c 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(229, 57, 53, 0.3);
    transform: translateY(0);
    flex-shrink: 0;
}

.btn-danger:hover {
    box-shadow: 0 10px 25px rgba(229, 57, 53, 0.4);
    transform: translateY(-2px);
}

.btn-danger:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(229, 57, 53, 0.2);
}

.account-management-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.account-management-action-button {
    flex: 1;
    margin-top: 0;
    padding: 12px 16px;
    border-radius: 999px;
}

.account-signout {
    margin-top: 16px;
    margin-bottom: 0;
}

