/* 引入自定义字体Lolita */
@font-face {
    font-family: 'Lolita';
    src: url('assets/fonts/Lolita.woff2') format('woff2'),
         url('assets/fonts/Lolita.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* 全局样式 */
body {
    background-color: #f1d5da;
    text-align: center;
    font-family: 'Lolita', Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}




/* 标题样式 */
h1 {
    font-size: 3.5vw;
    color: #68495b;
    margin: 20px 0;
    word-wrap: break-word;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}





/* 表白内容容器样式 */
.container {
    width: 90%;
    max-width: 500px;
}

/* 主图片样式 */
#mainImage {
    width: 100%;
    max-width: 200px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 问题文本样式 */
#question {
    font-size: 3.5vw;
    color: #68495b;
    margin: 20px 0;
    word-wrap: break-word;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 按钮容器样式 */
.buttons {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* “可以”按钮样式 */
#yes {
    background-color: #d4818e;
    color: white;
    font-family: 'Lolita', Arial, sans-serif;
    font-size: 4vw;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* “可以”按钮激活（点击）样式 */
#yes:active {
    transform: scale(0.95);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* “可以”按钮获得焦点样式 */
#yes:focus {
    outline: 2px solid #d4818e;
    outline-offset: 2px;
}

/* “不要”按钮样式 */
#no {
    background-color: #6784b1;
    color: white;
    font-family: 'Lolita', Arial, sans-serif;
    font-size: 4vw;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    margin: 10px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* “不要”按钮激活（点击）样式 */
#no:active {
    transform: scale(0.95);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* “不要”按钮获得焦点样式 */
#no:focus {
    outline: 2px solid #d4818e;
    outline-offset: 2px;
}

/* 表白成功页面样式 */
.yes-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffdae0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

/* 表白成功文字样式 */
.yes-text {
    font-family: 'Lolita', Arial, sans-serif;
    font-size: 7vw;
}

/* 表白成功图片样式 */
.yes-image {
    width: 50%;
    max-width: 300px;
}

/* 从下往上冒出和渐显动画关键帧 */
@keyframes slideUpFadeIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 触发从下往上冒出和渐显动画的类名 */
.slide-up-fade-in {
    animation: slideUpFadeIn 0.5s ease-out both;
}

/* 慢慢浮现动画关键帧 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 触发慢慢浮现动画的类名 */
.fade-in {
    animation: fadeIn 1s ease-out both;
}

/* 电脑端样式优化 */
@media (min-width: 768px) {
    body {
        display: flex;
    }
    .container {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: auto;
        max-width: none;
    }
    #mainImage {
        width: 200px;
    }
    h1 {
        font-size: 20px;
        margin: 20px 0;
    }
    #confirmNameButton,
    #languageSelect.styled-select {
        font-size: 18px;
    }
    #languageSelect.styled-select {
        padding: 10px 40px 10px 15px;
        background-position: right 12px center;
    }
    .yes-text {
        font-size: 36px;
    }
    .yes-image {
        width: 300px;
    }
    input[type="text"] {
        font-size: 16px;
        width: 300px;
    }
    #nameInputContainer {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    #sidehead {
        width: 200px;
    }
    #xiaohongshuLink,
    #douyinLink,
    #repoLink {
        font-size: 16px;
        margin-top: 10px;
    }
}

/* 移动端优先样式优化 */
@media (max-width: 767px) {
    body {
        height: auto;
        min-height: 100vh;
        padding: 15px;
    }
    #nameInputContainer {
        width: 95%;
        transform: none;
        position: relative;
        top: auto;
        left: auto;
    }
    h1 {
        font-size: 6vw !important;
        margin: 10px 0;
    }
    .free-notice {
        font-size: 14px;
        margin: 5px 0;
        padding: 6px;
    }
    #confirmNameButton,
    #languageSelect.styled-select {
        font-size: 5.5vw;
        padding: 8px 15px;
        margin: 5px;
        min-width: 45%; /* 确保按钮在移动端不会被挤压 */
    }
    input[type="text"] {
        font-size: 16px;
        width: 85%;
    }
    #xiaohongshuLink,
    #douyinLink,
    #repoLink {
        font-size: 14px;
        margin-top: 3px;
    }
    #mainImage,
    #sidehead {
        max-width: 150px;
    }
    .yes-text {
        font-size: 8vw;
        padding: 0 10px;
    }
}

/* 超小屏适配 (iPhone SE等) */
@media (max-width: 320px) {
    h1 {
        font-size: 20px !important;
    }
    #confirmNameButton,
    #languageSelect.styled-select {
        font-size: 18px;
    }
    .free-notice {
        font-size: 12px;
    }
}

/* 横向手机适配 */
@media (max-height: 500px) and (orientation: landscape) {
    #nameInputContainer {
        transform: scale(0.85);
        padding-top: 5px;
    }
    #sidehead {
        max-width: 100px;
    }
}