html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-viewreport {
    color: #fff;
    background-color: #FA7E6E;
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 22px; /*16px;*/
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    margin-bottom: 10px;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0Ljcx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3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.status-bar-safe-area {
    display: none;
}

@supports (-webkit-touch-callout: none) {
    .status-bar-safe-area {
        display: flex;
        position: sticky;
        top: 0;
        height: env(safe-area-inset-top);
        background-color: #f7f7f7;
        width: 100%;
        z-index: 1;
    }

    .flex-column, .navbar-brand {
        padding-left: env(safe-area-inset-left);
    }
}


/* 🔹 App Header */
/*.app-header {
    position: fixed;
    top: 100px;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #1976d2;
    color: white;
    display: flex;
    align-items: center;
    padding: 0 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1000;
}
*/
/* 🔹 返回鍵 */
.btn-back-app {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    margin-right: 10px;
    cursor: pointer;
}

/* 🔹 內容區 */
.page-body {
    margin-top: 60px;
    padding: 10px;
}
body {
    background-color: #F4F8FB;
    font-size: 18px;
    line-height: 1.6;
}

/*.container {
    width: 100%;
    
}*/
.container {
    max-width: 800px;
   
}
/*@media (min-width: 768px) {
    .container {
        max-width: 800px;*/ /* 比900更舒適閱讀 */
        /*margin: auto;
    }
}*/
/* =========================
   📱 手機直向（上下排）
   ========================= */
@media (max-width: 600px) and (orientation: portrait) {

    .form-row {
        flex-direction: column;
       align-items: flex-start;
      
    }

        /*.form-row label {
            width: 100%;
            margin-bottom: 4px;
        }*/
        .form-row label {
            width: 100% !important;
            min-width: unset !important; /* 🔥 這行是關鍵 */
            text-align: left !important;
            margin-right: 0 !important;
        }
        /*.form-row label {
            width: 100%;
            text-align: left;*/ /* ✅ 關鍵：文字靠左 */
            /*margin-left: 0;*/ /* 避免任何偏移 */
            /*padding-left: 0;*/ /* 保險（有些瀏覽器會有預設） */
        /*}*/

        .form-row .inputs {
            width: 100%;
        }

    input {
        flex: 1;
        min-width: 80px;
    }
}

/* =========================
   📱➡️📱 手機橫向（回桌機排版）
   ========================= */
/* @media (max-width: 812px)*/
@media (max-width: 800px) and (orientation: landscape) 
{

    .container {
        max-width: 800px;
    }

    .form-row {
        flex-direction: row;
        align-items: center;
    }

        /*        .form-row label {
                width: 400px;
                min-width: 400px;
                margin-bottom: 0;
            }*/


        .form-row .inputs {
            width: auto;
            flex-wrap: wrap;
        }

    input {
        width: auto;
        min-width: 60px;
    }
}
b {
    font-size: 20px;
}
.section {
    border: 1px solid #ccc;
    padding: 12px;
    margin-top: 5px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: #fafafa;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.section-title {
    background-color: #E3F2FD; /* 淡青綠色  #dfe88f;*/
    color: #1565C0; /*  深藍色*/ /*#333333;*/
    font-size: 18px;
    font-weight: bold; /*normal;*/
    padding: 10px 12px;
    border-radius: 8px 8px 0 0;
    /* border-radius: 4px 4px 0 0;*/
    border: 1px solid #BBDEFB;
    /* border: 1px solid #cfd87a;*/
    box-sizing: border-box;
}

.sectiontop0 {
    border: 1px solid #BBDEFB;
    /* border: 1px solid #ccc;*/
    padding: 12px;
    margin-top: 0px;
    margin-bottom: 16px;
    border-radius: 0 0 8px 8px;
    /*border-radius: 0 0 4px 4px;*/
    background-color: white;
    /* background: #fafafa;*/

    box-shadow: 0 2px 4px rgba(30, 136, 229, 0.05);
    /*box-shadow: 0 2px 6px rgba(0,0,0,0.2);*/
}

button:not(.menuBtn):not(.homeBtn) {
   /* box-shadow: 0 4px 12px rgba(142,68,173,0.4);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);*/
    border-radius: 12px; /* 增加一點圓角更有現代感  10px;*/

    transition: transform 0.1s ease-in-out;
}

    /* 只對「沒有 disabled 屬性」的按鈕執行點選反應 */
    button:not(:disabled):active {
        transform: scale(0.97);
        opacity: 0.9;
    }

.btn-calculator {
    background: #4CAF50; /* linear-gradient(135deg, #27ae60, #219653)*/
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 22px; /*16px;*/
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    margin-bottom: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #2f80ed, #1c5ed6);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 22px; /*16px;*/
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    margin-bottom: 10px;
}

.btn-upgrade {
    background: linear-gradient(to right, #FF9800, #F57C00); /*linear-gradient(135deg, #f39c12, #e67e22);*/
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px;
    width: 100%;
    font-size: 22px; /*16px;*/
    font-weight: bold;
    cursor: pointer;
}


/* 已解鎖按鈕的基礎樣式 (停用狀態) */
.btn-disabled {
    width: 100%;
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid #d1d1d1; /* 淺灰色邊框 */
    background-color: #f5f5f5; /* 極淺灰背景，營造不可點擊感 */
    color: #d4af37; /*color: #666666;*/ /* 深灰色文字 */
    font-size: 1.1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* 圖示與文字的間距 */
    cursor: not-allowed; /* 滑鼠指標顯示禁止符號 */
    box-shadow: none;
    transition: none;
}

 
    /* 針對圖示(火箭)的小優化，讓它看起來不會跟著變灰，保持一點亮度 */
    /*.btn-disabled i, .btn-disabled span.icon {
        filter: none;*/ /* 確保圖示顏色鮮明 */
        /*font-size: 1.3rem;
    }*/

/* 如果你想讓「已解鎖」三個字帶點金色或紫色感，顯示尊榮感 */
/*.btn-unlocked-text {
    color: #d4af37;*/ /* #8e44ad紫色 (與支持者版色系呼應) */
    /* 或者用金色 #d4af37 */
/*}*/


.btn-upgrade-plus {
    background: linear-gradient(to right, #9C27B0, #7B1FA2); /*linear-gradient(135deg, #8e44ad, #6f2dbd);*/
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px;
    width: 100%;
    font-size: 22px; /*16px;*/
    font-weight: bold;
    cursor: pointer;
}

.btn-restore {
    background: #f8fafc; /* 淡灰背景 */
        color: #475569; /* 深灰字 */
        border: 1px solid #cbd5e1; /* 淡邊框 */
        border-radius: 10px;
        padding: 12px;
        width: 100%;
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    /* hover */
    .btn-restore:hover {
        background: #f1f5f9;
        border-color: #94a3b8;
        color: #1e293b;
    }

    /* 按下 */
    .btn-restore:active {
        transform: scale(0.98);
    }

    /* disabled（可選） */
    .btn-restore:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
/* 容器 */
.pricing-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 卡片 */
.pricing-card {
    background: white;
    border: 1px solid #ccc;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: relative;
}

/* 推薦標籤 */
.badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: #ff9800;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
}

/* 價格 */
.price {
    font-size: 28px;
    font-weight: bold;
    margin: 10px 0;
}

/* 功能列表 */
.pricing-card ul {
    padding-left: 18px;
    margin-bottom: 16px;
}

.pricing-card li {
    margin-bottom: 6px;
}

.pricing-card .disabled {
    color: #aaa;
}
 
/* 強調卡片 */
.pricing-card.highlight {
    border: 2px solid #2f80ed;
}

/*.card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}*/
.card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.small-note {
    background: #f8fafc; /* 淡灰藍 */
    border-left: 4px solid #3b82f6; /* 藍色重點線 */
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size:18px;/* 16px;*/
    line-height: 1.6;
    color: #334155; /* 深灰文字 */
    border-radius: 6px;
}

    .small-note a {
        color: #2563eb;
        text-decoration: none;
        font-weight: 500;
    }

        .small-note a:hover {
            text-decoration: underline;
        }


.chart-locked {
    border: 1px dashed #cbd5e1;
    background: #f9fafb;
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
    margin-top: 10px;
}

    /* 鎖定提示文字 */
    .chart-locked .overlay {
        font-size: 14px;
        color: #64748b;
        margin-bottom: 12px;
        line-height: 1.5;
    }

    /* 按鈕 */
    .chart-locked .btn-upgrade {
        background: #2563eb;
        color: #fff;
        border: none;
        padding: 10px 16px;
        border-radius: 8px;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

        .chart-locked .btn-upgrade:hover {
            background: #1d4ed8;
        }

.hint {
    font-size: 14px;
    color: #94a3b8; /* 淡灰 */
    margin-top: 12px;  /*  8px;*/
    line-height: 1.4;
}
/* 針對 Chrome, Safari, Edge, Opera 隱藏數字輸入框的上下箭頭 */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 針對 Firefox 隱藏（以防萬一） */
input[type=number] {
    -moz-appearance: textfield;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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


.splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh; /* 滿版 */
    background: #f8fafc;
    text-align: center;
}

    /* Logo */
    .splash .logo {
        font-size: 22px;
        font-weight: bold;
        color: #1e293b;
        margin-bottom: 16px;
    }

    /* Loading 文字 */
    .splash .loading-text {
        font-size: 13px;
        color: #64748b;
        margin-top: 10px;
    }

    /* Spinner */
    .splash .spinner {
        width: 28px;
        height: 28px;
        border: 3px solid #cbd5e1;
        border-top: 3px solid #6366f1;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

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

h3.status-text {
    color: #1565C0;
    font-size: 1.25rem;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
h3.status-success {
    color: #1565C0; /* 您使用的深藍色 */
    font-weight: 700;
    text-align: center;
    margin: 24px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

    /* 左右兩側的小裝飾線，增加儀式感 */
    h3.status-success::before, h3.status-success::after {
        content: "";
        flex: 1;
        height: 1px;
        background: linear-gradient(to right, transparent, #BBDEFB, transparent);
        margin: 0 15px;
        max-width: 50px;
    }

.result-info {
   
    color: #355C7D;
    font-weight: 600;
}

#top {
    scroll-margin-top: 70px; /* 根據你 Header 的實際高度調整，避免標題被 Header 遮住 */
}
#Abouttop {
    scroll-margin-top: 70px; /* 根據你 Header 的實際高度調整，避免標題被 Header 遮住 */
}

#report {
    scroll-margin-top: 15px; /* 根據你 Header 的實際高度調整，避免標題被 Header 遮住 */
}
#assettrend {
    scroll-margin-top: 15px; /* 根據你 Header 的實際高度調整，避免標題被 Header 遮住 */
}
#downassetmonth {
    scroll-margin-top: 15px; /* 根據你 Header 的實際高度調整，避免標題被 Header 遮住 */
}

/* 底下 copy from about.razor  */
html {
    scroll-behavior: smooth;
}

.back-to-top {
    text-decoration: none; /* 移除超連結底線 */
    position: fixed;
    bottom: 110px;
    right: 20px; /* 手機直立時，距離右邊 20px */
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #2f80ed, #1c5ed6);
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; /* 很重要 */
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
}
    /* 當同時擁有 .no-ads 時，覆蓋 bottom 設定 */
    .back-to-top.no-ads {
        bottom: 60px; /* 去廣告時距離底部 60px */
    }

    /* 🌟 新增：當處於 Web 平台時，擁有最高優先權將 bottom 設定為 20px */
    .back-to-top.is-web {
        bottom: 20px !important; /* 使用 !important 確保無論有無廣告，Web 端一律是 20px */
    }

/* ==========================================================================
   情境 B：手機轉橫（動態覆蓋樣式）
   ========================================================================== */
@media screen and (max-width: 932px) and (orientation: landscape) {
    .back-to-top {
        right: calc(5px + env(safe-area-inset-right, 0px));
        bottom: 60px; /* 橫放 + 有廣告：距離底部 60px */
    }

        /* 橫放 + 去廣告 */
        .back-to-top.no-ads {
            bottom: 10px; /* 橫放 + 去廣告：距離底部 10px */
        }
}


    .back-to-top:active span {
        color: #ffffff; /* 這裡改成你想要的顏色，例如紅色 */
    }

    .back-to-top:visited {
        color: #ffffff; /* 點擊過後（造訪過）的顏色 */
    }

    .back-to-top:hover {
        transform: translateY(-2px);
    }



/* MainLayout.razor    */

.app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
    background: #F4F8FB;
}



.appbar {
    display: flex;
    align-items: center;
    background-color: #1E88E5; /* #CFE5C2 */
    color: #FFFFFF; /* #1F2D1F */
    height: calc(50px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    font-size: 24px; /* 20 */
}

.menuBtn {
    background: none;
    border: none;
    color: white; /* black */
    font-size: 28px;
    margin-right: 10px;
    width: 60px;
    font-weight: bold;
    /* 新增：將按鈕垂直向上平移 3px */
    transform: translateY(-3px);
    
}


/* 修改這部分 */
.rightArea {
    position: absolute;
    right: 10px;
    height: 50px; /* 固定高度與標題區塊一致 */
    display: flex;
    align-items: center; /* 垂直置中 */
    bottom: 0; /* 固定在底部（避開 padding-top） */
}

/* 確保按鈕本身沒有多餘的 margin */
.homeBtn {
    font-size: 20px;
    width: 40px;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    color: white;
}

/* 2. 新增：偵測當手機轉為橫向 (Landscape) 時的樣式 */
/* 偵測當手機轉為橫向 (Landscape) 時 */
@media (orientation: landscape) {
    .rightArea {
        /* 基礎靠右 45px，並自動加上橫向右側的安全區域寬度 */
        right: calc(5px + env(safe-area-inset-right, 0px));
    }
}