:root {
    --color-1: #927ea5;
    --color-2: #c8a5c9;
    --color-3: #af4f9f;
}

/* 笔记： 
css fr 单位是一个自适应单位，fr单位被用于在一系列长度值中分配剩余空间；
rem（font size of the root element）是指相对于根元素的字体大小的单位； 
 */

/* grid布局 */
body {
    display: grid;
    height: 100vh;
    margin: 0;
    padding: 0;
    grid-template-rows: 10rem 1fr auto;
    background-color: var(--color-1);
}

header h1 {
    margin-top: 4rem;
    text-align: center;
    font-family: "Comic Sans MS", 'Hiragino Sans GB', sans-serif;
    color: ivory;
    font-size: 3.5rem;
}

main {
    display: grid;
    grid-template-rows: auto 1fr;
}

footer {
    padding: 1rem;
    text-align: center;
}

/* 中间main部分 */
.up3 {
    width: 37rem;
    height: 16rem;
    margin: 0 auto;
}

.name {
    height: 3rem;
    margin-top: 3rem;
    display: flex;
    align-items: center;
    /* 垂直居中 */
    justify-content: space-between;
    /* 两端对齐 */
}

.name input {
    width: 15.5rem;
    height: 3rem;
    font-size: 2rem;
    border: none;
    outline: none;
    outline-offset: 0;
    /* 清除文本框样式 */
    text-indent: 1rem;
    /*输入框中输入文字时前面的一段距离*/
    vertical-align: middle;
    /*解决输入文字时文本框移动问题*/
    background-color: rgb(255, 255, 252);
}

button {
    width: 5rem;
    height: 3rem;
}

/* 风格选项 */
.style {
    width: 12.5rem;
    margin: auto;
    margin-top: 1rem;
    color: ivory;
    text-align: center;
    display: flex;
}

.style input[type="radio"] {
    width: 1.2rem;
    height: 1.2rem;
    background-color: ivory;
    border-radius: 100%;
    -webkit-border-radius: 100%;

    margin: 0 1rem 0 0;
    padding: 0;
    position: relative;
    display: inline-block;
    vertical-align: top;
    cursor: pointer;
    -webkit-appearance: none;
    /* 隐藏原生控件 */
}

.style input[type="radio"]:checked {
    background-color: var(--color-3);
    text-align: center;
}

.show {
    width: 37rem;
    height: 6rem;
    margin: auto;
    position: relative;
    top: 1rem;
    display: flex;
    align-items: center;
    /* 垂直居中 */
    justify-content: space-between;
    /* 两端对齐 */
}

#cp_name {
    width: 31.75rem;
    height: 6rem;
    text-align: center;
    line-height: 6rem;
    background-color: var(--color-2);
    color: rgb(251, 245, 251);
}

.intro {
    width: 37rem;
    height: auto;
    margin: auto;
    overflow: hidden;
    margin-top: 2rem;
    font-size: 1.2rem;
}

.intro p {
    margin: 0.3rem 0 0 0.5rem;
    color: #fbf5fb;
}

/* 底部 */
footer .author span.ml1 {
    margin-left: 1rem;
}

footer .author a {
    color: var(--color-2);
    text-decoration: underline;
}

footer .author a:hover {
    background-color: var(--color-2);
    color: #fbf5fb;
}