*,
::before,
::after {
    box-sizing: border-box;
    border-width: 0;
}

html,
body {
    padding: 0;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background-color: #f0f2f5;
    position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit;
}

a {
    color: inherit;
    text-decoration: inherit;
}

b,
strong {
    font-weight: bolder;
}

code,
kbd,
samp,
pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 1em;
}

small {
    font-size: 80%;
}

table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
}

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
}

button,
select {
    text-transform: none;
}

button,
[type='button'],
[type='reset'],
[type='submit'] {
    -webkit-appearance: button;
    background-color: transparent;
    background-image: none;
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

progress {
    vertical-align: baseline;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
    height: auto;
}

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
    margin: 0;
}

fieldset {
    margin: 0;
    padding: 0;
}

legend {
    padding: 0;
}

ol,
ul,
menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

textarea {
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    opacity: 1;
    color: #9ca3af;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
    display: block;
    vertical-align: middle;
}

img,
video {
    max-width: 100%;
    height: auto;
}

/* 主容器 */
body {
    padding: 20px;
}

/* 模型容器和卡片 */
#models-container {
    display: grid;
    /* PC 端和大部分平板的布局 */
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 40px;
    justify-items: start;
    align-items: start;
    padding: 20px 50px;
}

.model-card {
    position: relative;
    width: 550px;
    background-color: #fff;
    border-radius: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 15px 35px 23px 35px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.model-name {
    font-size: 32px;
    font-weight: 700;
    color: rgb(0, 0, 0);
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    outline: none;
    cursor: pointer;
}

.model-datetime {
    font-size: 20px;
    font-weight: 700;
    color: rgb(0, 0, 0);
}

.model-images-container {
    padding: 20px 0;
}

.images-content-wrapper {
    display: flex;
    flex-direction: column;
}

.image-count {
    font-size: 20px;
    font-weight: 700;
    color: rgb(0, 0, 0);
    margin-bottom: 20px;
}

.image-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: start;
}

.image-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ddd;
    transform: rotate(calc((var(--index) - 3) * 2deg));
    transition: transform 0.3s ease;
}

.image-placeholder {
    width: 80px;
    height: 80px;
    background-color: #efefef;
    border-radius: 5px;
}

.model-footer {
    display: flex;
    justify-content: flex-end;
    /* 将内容靠右对齐 */
    padding-top: 5px;
}

.use-model-button {
    width: 200px;
    height: 60px;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    background-color: #a4a4a4;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

.use-model-button:hover:not(:disabled) {
    background-color: #888;
}

.use-model-button:disabled {
    cursor: not-allowed;
    background-color: #dcdcdc;
}

.image-placeholder {
    /* 继承 img 的基本样式 */
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background-color: #f0f2f5;
    /* 一个浅灰色背景 */
    display: flex;
    justify-content: center;
    /* 水平居中 */
    align-items: center;
    /* 垂直居中 */
    border: 1px solid #e0e0e0;
    margin-right: -10px;
    /* 负边距保持与图片的重叠效果 */
    position: relative;
    z-index: 1;
    /* 确保它在前面 */
    overflow: hidden;
    color: #bdbdbd;
    /* SVG 图标的颜色 */
}

@media (max-width: 600px) {
    #models-container {
        grid-template-columns: 1fr;
        /* 手机一列 */
        gap: 15px;
        padding: 5px;
    }

    .model-card {
        padding: 20px;
    }

    .model-name {
        font-size: 24px;
        max-width: 200px;
    }

    .model-datetime {
        font-size: 14px;
    }

    .use-model-button {
        width: 150px;
        height: 50px;
        font-size: 16px;
    }
}

/* User Info Box (if applicable) */
.aiinkeduser-info-box {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 2px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 1px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: auto;
    width: 100%;
}

.aiinkeduser-info-item {
    display: flex;
    align-items: center;
    margin-right: 2px;
}

.aiinkedchakra-icon {
    width: 26px;
    height: 26px;
    margin-right: 2px;
}