/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    line-height: 1;
    font-family: serif;
}

a{
    color: inherit;
    text-decoration: none;
}

/* 滚动条隐藏 */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 基础样式 */
.w100 {
    width: 100%;
}

.h100 {
    height: 100%;
}

/* 主容器样式 */
.color {
    width: 100%;
    height: 100%;
    transition: all 0.5s linear;
    position: relative;
}

.color-wrapper {
    position: fixed;
    width: 100%;
    height: 100%;
    background-image: url('./grain.png');
}

.color-container {
    margin: 0 auto;
    position: relative;
    height: 100%;
    display: flex;
    gap: 10vw;
    justify-content: center;
}

.color-container-collapse-btn {
    display: none;
    position: fixed;
    z-index: 999;
    top: 1em;
    left: 0.95em;
    padding: 0.3em;
    border-radius: 50%;
    border: 0.17em solid;
    cursor: pointer;
}

.color-container-color {
    overflow-y: scroll;
    height: 100%;
    scrollbar-width: none;
}

.color-container-color-item {
    position: relative;
    top: 3.125em;
    display: flex;
    letter-spacing: 0.1825em;
    margin-bottom: 2em;
}

.color-container-color-item-solarterm {
    writing-mode: vertical-lr;
    padding-right: 1.5em;
    font-size: 1.5em;
}

.color-container-color-item-block {
    width: 100%;
    left: 0;
    padding-bottom: 2em;
    display: flex;
    flex-wrap: wrap;
}

.color-container-color-item-block div {
    writing-mode: vertical-lr;
    padding: 0.5em;
    display: flex;
    gap: 0.5em;
    align-items: center;
    cursor: pointer;
    position: relative;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.color-container-color-item-block span {
    position: relative;
    z-index: 2;
    font-size: 1em;
}

.color-container-color-item-block i {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    border-radius: 50%;
    z-index: 1;
}

.color-container-color-item-block .current , .color-container-color-item-block .current i {
    box-shadow2: 0 0 0 1px;
    border: 1px solid;
}

.color-name{
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.color-container-name {
    display: block;
    position: relative;
}

.color-container-name-title {
    font-size: 5em;
    writing-mode: vertical-lr;
    position: relative;
}
.color-container-name-rgb {
    position: absolute;
    height: 0;
    top: 1em;
    left: -3em;
    font-family: monospace;
    text-transform: uppercase;
    writing-mode: vertical-lr;
    cursor: pointer;
    letter-spacing: 1px;
}

.color-container-name-rgb span{
    display: inline-block;
    margin: 0 2px;
    border-left: 1px dashed;
}

.color-container-name-rgb p {
    padding-bottom: 2.2em;
    display: flex;
    align-items: center;
}

.color-container-name-rgb p span:first-child {
    transform: scale(0.65);
    display: inline-block;
    position: relative;
    top: -0.7em;
    left: 0.1em;
}

.color-container-name-rgb p span:last-child {
    font-size: 1.1em;
}

.color-container-sentence {
    writing-mode: vertical-rl;
}

.color-container-sentence .sentence {
    display: block;
    letter-spacing: 4px;
    line-height: 1.5;
}

.color-container-sentence .sentence span {
    font-size: 1.375em;
    border-left: 1px solid;
}

.color-container-sentence .sentenceFrom {
    padding-right: 1em;
}

.color-container-sentence .sentenceFrom span:first-child:before {
    content: "「";
}

.color-container-sentence .sentenceFrom span:last-child:after {
    content: "」";
}

.color-copyright {
    writing-mode: vertical-lr;
    position: absolute;
    z-index: 1;
    right: 0;
    top: 0;
    font-size: 0.875em;
    height: 100%;
    padding: 0 0.5em;
    display: flex;
    justify-content: space-between;
    border-left: 1px solid;
    letter-spacing: 4px;
}

.color-copyright span{
    flex-grow: 1;
    border-bottom: 1px solid;
    text-align: center;
}

.color-copyright span:last-child{
    border-bottom: none;
}

.color-copyright span:hover{
    font-weight: bold;
}

#copyright-text{
    font-family: monospace, serif;
}

@keyframes show {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.color-container-sentence .sentence span.active,
.color-container-sentence .sentenceFrom span.active {
    opacity: 0;
    animation: show 1.5s ease-out forwards;
}
.color-container-name.active span {
    opacity: 0;
    animation: show 1.5s ease-out forwards;
}


/* 响应式设计 */
@media screen and (max-width: 780px) {
    .color-container {
        max-width: 100vw;
        position: relative;
    }

    .color-container-collapse-btn {
        display: block;
    }

    .color-container-color {
        transition: all 0.2s;
        position: fixed;
        top: 0;
        left: 0;
        width: 3em;
        padding: 1em 0;
        z-index: 10;
    }

    .color-container-color-item {
        top: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .color-container-color-item-solarterm {
        padding-right: 0;
        padding-bottom: 1em;
        font-weight: bold;
        opacity: 0.7;
    }

    .color-container-color-item-block {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .color-container-color-item-block div {
        width: 1.5em;
    }

    .color-container-color-item-block i {
        right: 0.25em;
    }
}

@media screen and (min-width: 781px) and (max-width: 1500px) {
    .color-container {
        max-width: 75vw;
        position: relative;
    }
}

/* 语言切换按钮 */
.language-toggle, .music-toggle  {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* 隐藏音频元素 */
audio {
    display: none;
}

.music-toggle.playing {
	animation: blink 2s ease-in-out infinite;
}
.music-toggle:before{
    content:"♬ ";
}

#share-btn-text:before{
    content:"❤︎ ";
}

@keyframes blink {
    0% {opacity: 0.1}
    50% {opacity: 1}
    100% {opacity: 0.1}
}
