/* =========================================
   网站基础样式
   ========================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #101116;
    color: #eee;
    font: 16px/1.65 system-ui,sans-serif;
}

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

header {
    background: #191b23;
    padding: 16px max(4%,calc((100% - 1200px)/2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid #30323c;
}

.brand {
    font-size: 24px;
    font-weight: 800;
    color: #6554b8;
}

main {
    max-width: 1250px;
    margin: auto;
    padding: 24px 100px 24px 24px;
}

.hero {
    background: linear-gradient(125deg,#28233b,#171c28);
    border: 1px solid #373346;
    border-radius: 22px;
    padding: 36px;
    position: relative;
    overflow: hidden;
    padding-bottom: 85px;
}

h1 {
    font-size: clamp(24px,4vw,36px);
    margin: 0;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
    padding: 20px 0;
}

nav a {
    background: #242733;
    border: 1px solid #393c4a;
    padding: 10px 20px;
    border-radius: 30px;
    color: #eee;
    text-decoration: none;
}

nav a:hover {
    background: #7655cf;
}

/* =========================================
   图片列表
   ========================================= */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(190px,1fr));
    gap: 20px;
}

.tile {
    border: 1px solid #30323e;
    border-radius: 16px;
    overflow: hidden;
    background: #1d2029;
    box-shadow: 0 2px 10px #0001;
    transition: transform .2s;
}

.tile:hover {
    transform: translateY(-3px);
}

.tile img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

.tile strong,
.tile small {
    display: block;
    padding: 5px 12px;
}

.tile small {
    color: #a5a8b4;
}

.photos {
    max-width: 850px;
    margin: auto;
}

.photos img {
    width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}

/* =========================================
   表单及后台样式
   ========================================= */

input,
textarea,
button {
    font: inherit;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 7px;
}

button {
    background: #6554b8;
    color: white;
    border: 0;
    cursor: pointer;
}

footer {
    margin-top: 48px;
    color: #a5a8b4;
    text-align: center;
}

label {
    display: block;
    margin: 12px 0;
}

textarea {
    width: 100%;
    min-height: 90px;
}

.admin {
    max-width: 850px;
    margin: auto;
    background: white;
    padding: 24px;
    border-radius: 12px;
}

/* =========================================
   顶部客服
   ========================================= */

.topcontacts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.contact {
    display: inline-block;
    padding: 9px 12px;
    border-radius: 10px;
    color: white !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    background: #485268;
}

.contact.line,
.contact.ws {
    background: #147b48;
}

.contact.sg,
.contact.tg {
    background: #2466a5;
}

/* =========================================
   右侧悬浮客服
   ========================================= */

.floating {
    position: fixed;
    right: 12px;
    top: 35%;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.floating:empty {
    display: none;
}

/* =========================================
   后台套图编辑
   ========================================= */

.edit-album {
    padding: 16px;
    margin: 12px 0;
    border: 1px solid #343746;
    border-radius: 12px;
}

.edit-album summary {
    cursor: pointer;
}

.edit-album select {
    background: #252838;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
}

/* =========================================
   客服二维码
   ========================================= */

.qrcontact {
    position: relative;
    color: white;
    background: #485268;
    border-radius: 8px;
    padding: 8px;
    font-size: 13px;
}

.qrcontact summary {
    cursor: pointer;
}

.qrcontact img {
    position: absolute;
    right: 0;
    top: 100%;
    width: 150px;
    background: white;
    padding: 6px;
    z-index: 30;
}

.floating .qrcontact img {
    right: 100%;
    top: 0;
}

/* =========================================
   彻底关闭旧版四周水印
   ========================================= */

html body .studio-watermark {
    display: none !important;
    visibility: hidden !important;
}

html body::before,
html body::after,
html body header::before,
html body header::after {
    content: none !important;
    display: none !important;
}

/* =========================================
   小黄鸭素材工作室
   新版品牌水印
   ========================================= */

/* 第一处：网站名称旁边 */

header .brand::after {
    content: "小黄鸭素材工作室 TG @huihua0";
    display: inline-block;
    margin-left: 20px;
    font-size: 20px;
    font-weight: 800;
    font-family: "Microsoft YaHei",Arial,sans-serif;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.5px;
    vertical-align: middle;
    pointer-events: none;
    white-space: nowrap;
}

/* 第二处：左侧纵向水印 */

html body main::before {
    content: "小黄鸭素材工作室 TG @huihua0";
    position: fixed;
    left: 22px;
    top: 58%;
    transform: translateY(-50%) rotate(180deg);
    writing-mode: vertical-rl;
    font-family: "Microsoft YaHei",Arial,sans-serif;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.60);
    text-shadow: 0 1px 3px #000;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: 8;
}

/* 第三处：最新套图上方 */

main nav::after {
    content: "小黄鸭素材工作室 TG @huihua0";
    display: block;
    flex-basis: 100%;
    width: 100%;
    text-align: center;
    margin-top: 15px;
    padding: 8px 0;
    font-family: "Microsoft YaHei",Arial,sans-serif;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.65);
    pointer-events: none;
}

/* =========================================
   首页介绍框走马灯
   ========================================= */

.hero::after {
    content: "小黄鸭素材工作室　人设包装　三方素材　人设定制　绘画素描　美工设计　唯一网站 renshetaotu.com";

    position: absolute;
    display: block;

    left: 100%;
    bottom: 18px;

    width: max-content;
    max-width: none;

    white-space: nowrap;

    font-family: "Microsoft YaHei",Arial,sans-serif;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 2px;

    color: #c4b0ff;

    text-shadow: 0 0 12px rgba(118,85,207,0.45);

    pointer-events: none;

    animation: studioMarqueeFinal 24s linear infinite;
    animation-play-state: running;
}

/* 完整走马灯动画 */

@keyframes studioMarqueeFinal {

    0% {
        left: 100%;
        transform: translateX(0);
    }

    100% {
        left: 0;
        transform: translateX(-100%);
    }
}

/* =========================================
   窄屏电脑适配
   ========================================= */

@media (max-width: 1400px) {

    html body main::before {
        left: 8px;
        font-size: 24px;
    }

    header .brand::after {
        font-size: 18px;
        margin-left: 12px;
    }
}

/* 避免左侧水印遮挡图片 */

@media (max-width: 1320px) {

    html body main::before {
        display: none;
    }
}

/* =========================================
   手机端自适应
   ========================================= */

@media (max-width: 700px) {

    main {
        padding: 14px 12px 85px;
    }

    .floating {
        top: auto;
        bottom: 10px;
        right: 8px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
        max-width: 95%;
    }

    .contact {
        font-size: 11px;
        padding: 7px;
    }

    .grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 10px;
    }

    .hero {
        padding: 20px;
        padding-bottom: 65px;
    }

    .floating .qrcontact img {
        right: 0;
        top: auto;
        bottom: 100%;
    }

    /* 手机端顶部品牌水印 */

    header .brand::after {
        display: block;
        margin-left: 0;
        margin-top: 6px;
        font-size: 15px;
        letter-spacing: 0;
        white-space: normal;
    }

    /* 手机端取消左侧水印 */

    html body main::before {
        display: none;
    }

    /* 手机端中间水印 */

    main nav::after {
        font-size: 19px;
        margin-top: 8px;
        letter-spacing: 0;
    }

    /* 手机端走马灯 */

    .hero::after {
        font-size: 22px;
        letter-spacing: 1px;
        bottom: 14px;
        animation-duration: 22s;
    }
}

/* 系统减少动画模式 */

@media (prefers-reduced-motion: reduce) {

    .hero {
        padding-bottom: 24px;
    }

    .hero::after {
        animation: none;
        position: static;
        width: auto;
        margin-top: 16px;
        white-space: normal;
        transform: none;
        font-size: 18px;
        letter-spacing: 0;
    }
}