.divQRDiv {
    padding: 50px 20px;
    background: #f5f6f8;
    color: #111;
}

.driver-name {
    font-family: var(--bs-font-sans-serif);
    font-weight: 700;
}

.page-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.page-title {
    margin-bottom: 45px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
}

.template-block {
    margin-bottom: 70px;
}

.template-title {
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
}

.preview-box {
    display: flex;
    justify-content: center;
    align-items: center;
}

.sticker {
    border: 1px solid;
    overflow: hidden;
}

.logo-img {
    display: block;
    object-fit: contain;
}

.driver-name {
    /*text-transform: uppercase;*/
    text-align: center;
    font-weight: 700;
    /*line-height: 0.95;*/
    line-height: 1.0;
    white-space: nowrap;
    /*overflow: hidden;*/
}

.profile-text {
    text-align: center;
    white-space: nowrap;
}

.vertical {
    width: 450px;
    height: 580px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
}

.vertical .logo-section {
    /*height: 175px;*/
    height: 125px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    /*border-bottom: 1px solid;*/
}

.vertical .logo-img {
    width: 300px;
    max-height: 100px;
}

.vertical .content-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 0 20px;
}

.vertical .driver-name {
    width: 390px;
    max-width: 390px;
    font-size: 46px;
    /*margin-bottom: 22px;*/
    margin-top: 22px;
}

.vertical .qr-container {
    width: 260px;
    height: 260px;
    flex-shrink: 0;
}

.vertical .profile-text {
    /*margin-top: 16px;*/
    margin-bottom: 16px;
    font-size: 26px;
}

.horizontal {
    width: 900px;
    height: 215px;
    border-radius: 6px;
    display: grid;
    grid-template-columns:
                    210px
                    320px
                    370px;
}

.horizontal .logo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    /*border-right: 1px solid;*/
}

.horizontal .logo-img {
    width: 260px;
    max-height: 90px;
}

.horizontal .content-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.horizontal .driver-name {
    width: 300px;
    max-width: 300px;
    font-size: 42px;
}

.horizontal .profile-text {
    margin-top: 12px;
    /*font-size: 16px;*/
    font-size: 26px;
}

.horizontal .qr-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.horizontal .qr-container {
    width: 170px;
    height: 170px;
}

.button-wrapper {
    margin-top: 22px;
    text-align: center;
}

.download-btn {
    min-width: 190px;
    height: 46px;
    padding: 0 26px;
    border: 0;
    border-radius: 7px;
    background: #111111;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.download-btn:hover {
    opacity: 0.85;
}

.download-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

@media (max-width: 950px) {
    body {
        padding: 30px 15px;
    }

    .horizontal-scroll {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .horizontal-scroll .preview-box {
        width: 900px;
        justify-content: flex-start;
    }
}


@media (max-width: 520px) {
    .vertical-preview-scale {
        width: 100%;
        overflow: hidden;
    }

    .vertical {
        transform: scale(0.78);
        transform-origin: top center;
        margin-bottom: -125px;
    }

    .page-title {
        font-size: 23px;
    }
}


/* ==========================================================
   Sticker Theme
   ========================================================== */

/* White */

.sticker.theme-white {
    background: #ffffff;
    border-color: #c8c8c8;
}

.theme-white .driver-name {
    color: #111111;
}

.theme-white .profile-text {
    color: #999999;
}

.theme-white.vertical .logo-section {
    border-bottom-color: #cccccc;
}

.theme-white.horizontal .logo-section {
    border-right-color: #cccccc;
}


/* Black */

.sticker.theme-black {
    background: #000000;
    border-color: #333333;
}

.theme-black .driver-name {
    color: #ffffff;
}

.theme-black .profile-text {
    color: #999999;
}

.theme-black.vertical .logo-section {
    border-bottom-color: #333333;
}

.theme-black.horizontal .logo-section {
    border-right-color: #333333;
}

/* ==========================================================
   Common Styles for New Sticker Types
   ========================================================== */

.helmet-horizontal,
.helmet-vertical,
.qr-only,
.logo-only {
    box-sizing: border-box;
}

.helmet-horizontal *,
.helmet-vertical *,
.qr-only *,
.logo-only * {
    box-sizing: border-box;
}

/*
 * 二维码必须始终保留白色背景。
 * 即使 Sticker 使用黑色主题，也不要反转二维码颜色。
 */
.helmet-horizontal .qr-container,
.helmet-vertical .qr-container,
.qr-only .qr-container {
    overflow: hidden;
    flex-shrink: 0;
    background: #ffffff;
}

.helmet-horizontal .qr-container > svg,
.helmet-horizontal .qr-container > canvas,
.helmet-horizontal .qr-container > img,
.helmet-vertical .qr-container > svg,
.helmet-vertical .qr-container > canvas,
.helmet-vertical .qr-container > img,
.qr-only .qr-container > svg,
.qr-only .qr-container > canvas,
.qr-only .qr-container > img {
    display: block;
    width: 100% !important;
    height: 100% !important;
}


/* ==========================================================
   Helmet Horizontal
   左侧二维码；右侧名字、Profile Text、Logo
   ========================================================== */

.helmet-horizontal {
    width: 500px;
    height: 235px;
    border-radius: 6px;
    display: grid;
    grid-template-columns: 215px 285px;
}

/* 左侧二维码 */

.helmet-horizontal .qr-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 17px 8px 17px 17px;
}

.helmet-horizontal .qr-container {
    width: 195px;
    height: 195px;
}

/* 右侧内容 */

.helmet-horizontal .content-section {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 20px 15px 0px;
}

/* 两行名字 */

.helmet-horizontal .driver-name {
    width: 260px;
    max-width: 260px;
    text-align: center;
    font-size: 34px;
    /*line-height: 0.92;*/
    line-height: 1.0;
    white-space: normal;
}

.helmet-horizontal .driver-name span {
    display: block;
    width: 100%;
    white-space: nowrap;
}

.helmet-horizontal .name-first-line {
    margin-bottom: 3px;
}

/* My Racing Profile */

.helmet-horizontal .profile-text {
    width: 210px;
    margin-top: 12px;
    text-align: center;
    font-size: 18px;
    line-height: 1.1;
}

/* 底部 Logo */

.helmet-horizontal .logo-section {
    width: 100%;
    height: 45px;
    margin-top: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.helmet-horizontal .logo-img {
    width: 165px;
    max-width: 100%;
    max-height: 42px;
    object-fit: contain;
}


/* ==========================================================
   Helmet Vertical
   上方二维码；下方 My Racing Profile
   ========================================================== */

.helmet-vertical {
    width: 300px;
    height: 365px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 上方二维码 */

.helmet-vertical .qr-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px 18px 8px;
}

.helmet-vertical .qr-container {
    width: 264px;
    height: 264px;
}

/* 下方文字 */

.helmet-vertical .profile-text {
    width: 270px;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0px 10px 16px;
    text-align: center;
    font-size: 20px;
    line-height: 1.1;
}


/* ==========================================================
   QR Code Only
   只有二维码
   ========================================================== */

.qr-only {
    width: 300px;
    height: 300px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-only .qr-section {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.qr-only .qr-container {
    width: 270px;
    height: 270px;
}


/* ==========================================================
   Logo Only
   只有 51GT3 Logo
   ========================================================== */

.logo-only {
    width: 450px;
    height: 180px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-only .logo-section {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px 35px;
}

.logo-only .logo-img {
    display: block;
    width: 350px;
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}


/* ==========================================================
   White Theme
   ========================================================== */

.theme-white.helmet-horizontal,
.theme-white.helmet-vertical,
.theme-white.qr-only,
.theme-white.logo-only {
    background: #ffffff;
    border-color: #c8c8c8;
}

.theme-white.helmet-horizontal .driver-name,
.theme-white.helmet-vertical .driver-name {
    color: #111111;
}

.theme-white.helmet-horizontal .profile-text,
.theme-white.helmet-vertical .profile-text {
    color: #777777;
}


/* ==========================================================
   Black Theme
   ========================================================== */

.theme-black.helmet-horizontal,
.theme-black.helmet-vertical,
.theme-black.qr-only,
.theme-black.logo-only {
    background: #000000;
    border-color: #333333;
}

.theme-black.helmet-horizontal .driver-name,
.theme-black.helmet-vertical .driver-name {
    color: #ffffff;
}

.theme-black.helmet-horizontal .profile-text,
.theme-black.helmet-vertical .profile-text {
    color: #aaaaaa;
}


/* ==========================================================
   Responsive Preview
   ========================================================== */

@media (max-width: 520px) {

    .helmet-horizontal-preview-scale,
    .helmet-vertical-preview-scale,
    .qr-only-preview-scale,
    .logo-only-preview-scale {
        width: 100%;
        overflow: hidden;
    }

    .helmet-horizontal {
        transform: scale(0.76);
        transform-origin: top center;
        margin-bottom: -56px;
    }

    .helmet-vertical {
        transform: scale(0.86);
        transform-origin: top center;
        margin-bottom: -51px;
    }

    .qr-only {
        transform: scale(0.86);
        transform-origin: top center;
        margin-bottom: -42px;
    }

    .logo-only {
        transform: scale(0.76);
        transform-origin: top center;
        margin-bottom: -43px;
    }
}
