/* 容器與卡片整體樣式 */
.result-area {
    position: relative;
    max-width: calc(100% - 1px);
    margin: 0 auto;
    background-color: #FFFFFF;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: center;
    display: none;
}

/* 頂部鮮明黃色圓弧幾何切分 */
.result-header-wave {
    background-color: #FEC70A;
    padding: 32px 24px 48px;
    border-bottom-left-radius: 50% 20px;
    border-bottom-right-radius: 50% 20px;
}

.result-header-wave h3 {
    margin: 0;
    color: #1A1A1A;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* 網址列與複製按鈕 */
.url-box {
    display: flex;
    align-items: center;
    background-color: #F7F8FA;
    border: 2px solid #EEEEEE;
    border-radius: 16px;
    padding: 6px 6px 6px 14px;
    margin-top: 10px;
    margin-bottom: 10px;
    transition: border-color 0.2s ease;
    width: 95%;
    box-sizing: border-box;
}

.url-box:focus-within {
    border-color: #FEC70A;
}

#generatedUrlText {
    flex: 1;
    font-size: 13px;
    color: #4A4A4A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.button {
    background-color: #1A1A1A;
    color: #FFFFFF;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.2s ease;
    margin-top: 8px;
    margin-bottom: 8px;
}

.button:active {
    transform: scale(0.96);
}

.button:hover {
    background-color: #333333;
}

/* QR Code 圓潤質感外框 */
.qrcode-container {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background-color: #FFFFFF;
    border-radius: 20px;
    border: 3px solid #FFF8E1;
    margin-bottom: 12px;
}

/* 調整 canvas/img 為圓點感的樣式設定 */
.qrcode-container canvas,
.qrcode-container img {
    border-radius: 8px; /* QR Code 四角微圓化 */
    display: block;
}

.result-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-body p {
    color: #8E8E93;
    font-size: 13px;
    margin: 8px 0 0;
}


* {
    box-sizing: border-box;
}

body {
    font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
    color: #172b4d;
    background: #f6f8fc;
}

header {
    background: #ffcf00;
    backdrop-filter: blur(1rem);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    height: 4rem;
    margin: auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a {
    text-decoration: none;
    color: #566579;
    padding: 0.7rem 1.2rem;
    border-radius: 0.7rem;
    font-size: 1rem;
    transition: 0.25s;
}

nav a:hover {
    background: #fff4c7;
    color: #0056a6;
}

.title {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #eaf4ff 0%, #f8fbff 50%, #eef0ff 100%);
}

.title-inner {
    max-width: 1200px;
    min-width: 240px;
    margin: auto;
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    background: #fff1b4;
    color: #1264a3;
}

.tag:hover {
    box-shadow: 0 0.5rem 0.8rem rgba(0, 86, 166, 0.3);
}

.title h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.25;
    color: #123b68;
    letter-spacing: 1px;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0.45;
}

.circle.one {
    width: 300px;
    height: 300px;
    right: 15%;
    top: -100px;
    background: #d5e9ff;
}

.circle.two {
    width: 220px;
    height: 220px;
    right: 2%;
    bottom: -100px;
    background: #dfe2ff;
}

main {
    padding: 0.7rem 1rem 1.2rem;
}

.content-card {
    background: white;
    border-radius: 1rem;
    padding: 1.2rem;
    border: 0.4rem solid #edf1f6;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.content-card h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #173c68;
    margin-block-end: 1rem;
}

.content-card h2 table tr td:first-child {
    text-align: center;
    vertical-align: top;
}

.content-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: #172b4d;
    margin-block-end: 0.1rem;
}

.content-card p {
    color: #64748b;
    font-size: 1.1rem;
    margin-block-start: 0.3rem;
    margin-block-end: 0.3rem;
}

.content-card p a {
    word-break: break-all;
}

footer {
    background: #ffcf00;
    color: #566579;
    border-bottom: 0.3rem solid #d51524;
}

.footer-inner {
    max-width: 1200px;
    margin: auto;
    padding: 1rem;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    font-size: 1rem;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .header-inner {
        height: auto;
        padding: 0.7rem 1rem;
    }

    .title-inner {
        padding: 0.7rem 1rem;
    }

    .title h1 {
        font-size: 1.5rem;
    }

    .content-card {
        padding: 0.7rem;
        padding-top: clamp(10px, 1vh, 10px);
        padding-bottom: clamp(10px, 1vh, 10px);
        padding-left: 1.5rem;
        padding-right: 1.5rem;

        width: 100%;
        box-sizing: border-box;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

.qrcode-canvas{
    display: inline-flex;
}