* {
    box-sizing: border-box;
}

:root {
    --tt-w-background: #ffffff;
    --tt-w-card-background: #f2f5ed;
    /*--tt-w-card-text: #1A1D16;*/
    --tt-w-card-text: #152c03;
    --tt-w-button-background: #DAE7C9;
    --tt-w-button-text: #3F4A34;
    --gi-badge-border: #3C5A43;
    --gi-badge-text: #3C5A43;
    --gi-btn-bg: #3C5A43;
    --gi-btn-text: #fff;
    --gi-btn-radius: 20px;
    --gi-shadow: 0 2px 8px rgba(60, 90, 67, 0.08);
}

:root {
    /* Anthropic-inspired Palette */
    --bg-warm: #fffcfb; /* Creamy white */
    --bg-warm-darker: #f0ebe4; /* Slightly darker beige for sections */
    --text-primary: #191919;
    --text-secondary: #5e5e5e;
    --accent-coral: #d97757; /* Warm Terracotta/Coral */
    --accent-coral-hover: #b95d3f;
    --accent-sand: #e3decb;

    --font-heading: 'IBMPlaxSans', serif; /* Slab serif feel */
    --font-body: 'IBMPlaxSans', system-ui, sans-serif;

    --radius-soft: 12px;
    --radius-pill: 50px;

    --border-light: #e5e0d8;
}

html {
    margin: 0;
    padding: 0;
}

.ttWebfontUiSong {
    font-family: 'ttWebfontUiSong', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

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

body {
    /* keep application.css font settings authoritative; provide fallback */
    font-family: var(--font-body), system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-warm);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
main{
    padding: 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading), serif;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.25;
}

a {
    text-decoration: none;
    color: inherit;
}

p {
    font-weight: 500;
}

nav {
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
}
.hero{
    display:  flex;
    gap: 20px;
    padding: 20px 40px;
    align-items: center;
}
.hero-text{
    width: 50%;
}
.hero-image{
    width: 50%;
}
.hero-image>img{
    width: 100%;
    display: block;
    border-radius: var(--radius-soft);
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---- 首頁 Feature 區 ---- */
.features-section {
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 48px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.feature-item {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-img {
    width: 100%;
    display: block;
    border-radius: var(--radius-soft);
}

.feature-item p {
    color: var(--text-secondary);
    flex: 1;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-coral);
    font-weight: 500;
}

.feature-link:hover {
    color: var(--accent-coral-hover);
}

.feature-link .material-symbols-outlined {
    font-size: 16px;
}

/* ---- 首頁結尾 CTA 區 ---- */
.cta-section {
    padding: 100px 40px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 24px;
}

.cta-section p {
    margin-bottom: 40px;
    color: var(--text-secondary);
}
.brand {
    font-family: var(--font-heading), serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand img {
    width: 120px;
    display: block;
}

.brand-sub {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
}

.loginInfo {
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.loginBox {
    background: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    padding: 2px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}


.dashboard-layout {
    display: flex;
    min-height: calc(100vh); /* nav height approx */
}

.sidebar {
    width: 280px;
    padding: 40px 30px;
    border-right: 1px solid var(--border-light);
    background-color: var(--bg-warm);
    overflow : visible;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-item {
    background: var(--bg-warm-darker);
    padding: 24px;
    border-radius: 16px;
}

.stat-val {
    font-family: Bitter, 'American Typewriter', 'Courier New', serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.myProjectId {
    background: #f4f1ea;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'American Typewriter', 'Courier New', monospace;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.modal-header h3 {
    font-size: 1.25rem;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    /* 讓 <a> 當按鈕用時外觀一致，view 不必再寫 inline style */
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-outline:hover {
    background: var(--bg-warm-darker);
}
.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Code Snippet */
.snippet-box {
    background: #f4f1ea;
    padding: 10px;
    border-radius: 8px;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    color: #444;
    overflow-x: auto;
    border: 1px solid var(--border-light);
    position: relative;
    margin-top: 10px;
    scrollbar-width:thin;
    scrollbar-color: #e1e1e1 rgba(255, 255, 255, 0);
}
pre{
    font-family: "American Typewriter", "Courier New", monospace;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: var(--bg-warm-darker);
    color: var(--text-primary);
}

.main-area {
     flex: 1;
     padding: 60px 80px;
    /* use site background variable */
    background-color: var(--bg-warm);
}

.card-box {
    width: 100%;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}


.contentBox {
    width: calc(100%);
    flex: 34;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    gap: 10px;
}

.subContentBox {
    flex: 1;
    min-height: 50px;
    background-color: var(--tt-w-card-background);
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: flex-start;
    line-height: 1em;
    padding: 5px 10px;
    color: var(--tt-w-card-text);
    font-size: 1.2em;
}

.btn-primary {
    background-color: var(--text-primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    /* 讓 <a> 當按鈕用時外觀一致，view 不必再寫 inline style */
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary:hover {
    background-color: #000;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0,
    'wght' 300,
    'GRAD' -25,
    'opsz' 48
}
#stickyBox{
    position:sticky;
    top:10px;
}
.projectBox {
    height: 100%;
    border-radius: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    background-color: rgba(227, 227, 227, 0);
    flex: 4;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    /*grid-auto-rows: minmax(160px, auto);*/
}

.tokenShowCard {
    width: 100%;
    padding: 17px 19px;
    border-radius: 10px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
}

.card-title {
    font-size: 19px;
    letter-spacing: .012em;
    line-height: 1.2;
    color: #1d1d1f;
}

.card-line {
    /*color: #6e6e73;*/
    /*font-size: 14px;*/
    /*font-weight: 400;*/
    /*letter-spacing: -.016em;*/
    /*line-height: 1.4;*/
    /*overflow: hidden;*/
    /*text-overflow: ellipsis*/
}

.code-box {
    display: flex;
    justify-content: space-between
}

/* 針對 Webkit 瀏覽器 (Chrome, Safari, Edge) */
.code-box pre::-webkit-scrollbar {
    height: 6px; /* 橫向捲軸高度 */
}

.code-box pre::-webkit-scrollbar-track {
    background: #f1f1f1; /* 捲軸軌道背景 */
    border-radius: 10px;
}

.code-box pre::-webkit-scrollbar-thumb {
    background: #ccc; /* 捲軸本體顏色 */
    border-radius: 10px;
}

.code-box pre::-webkit-scrollbar-thumb:hover {
    background: #aaa; /* 滑鼠懸停時的顏色 */
}

/* 針對 Firefox */
.code-box pre {
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

@media (max-width: 768px) {
    /* 原本這裡把 body 縮到 0.5em，手機上整站字只剩 8px，已移除 */
    nav {
        flex-wrap: wrap;
        padding: 16px 20px;
        row-gap: 12px;
    }

    .hero {
        flex-direction: column;
        padding: 20px;
    }

    .hero-text,
    .hero-image {
        width: 100%;
    }

    .features-section,
    .cta-section {
        padding: 40px 20px;
    }

    .contentBox {
        flex-direction: column;
    }
}