/* imageToIco.css - 图片转ico页面样式 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    color: #333;
    min-height: 100vh;
    padding-top: 80px;
    padding-bottom: 50px;
    line-height: 1.6;
}

/* 悬浮导航栏 - 9个链接样式 */
body > a:not([href='/xsx']) {
    display: inline-block;
    position: fixed;
    top: 0;
    z-index: 1000;
    text-decoration: none;
    padding: 10px 6px;
    font-weight: 600;
    font-size: 0.75rem;
    color: #fff;
    background-color: rgba(52, 73, 94, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    backdrop-filter: blur(10px);
    height: 45px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 导航链接悬停效果 */
body > a:not([href='/xsx']):hover {
    background-color: #9b59b6;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 为每个导航链接定位 - 8个左侧导航链接 */
body > a[href='/']:not([href='/xsx']) {
    left: 0;
    width: 8%;
    min-width: 55px;
}

body > a[href='/publicShare']:not([href='/xsx']) {
    left: 8%;
    width: 12%;
    min-width: 85px;
}

body > a[href='/article']:not([href='/xsx']) {
    left: 20%;
    width: 8%;
    min-width: 60px;
}

body > a[href='/chat']:not([href='/xsx']) {
    left: 28%;
    width: 10%;
    min-width: 70px;
}

body > a[href='/tools']:not([href='/xsx']) {
    left: 38%;
    width: 8%;
    min-width: 60px;
}

body > a[href='/login']:not([href='/xsx']) {
    left: 46%;
    width: 7%;
    min-width: 55px;
}

body > a[href='/signUp']:not([href='/xsx']) {
    left: 53%;
    width: 7%;
    min-width: 55px;
}

body > a[href='/comment']:not([href='/xsx']) {
    left: 60%;
    width: 12%;
    min-width: 85px;
}

/* xsx图片链接单独处理（如果存在） */
body > a[href='/xsx'] {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1001;
    width: 55px;
    height: 45px;
    background: transparent;
    border: none;
    padding: 0;
}

body > a[href='/xsx'] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* 主标题样式 */
h2 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3rem);
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
    margin: 30px auto 40px;
    padding-bottom: 15px;
    border-bottom: 3px solid #9b59b6;
    max-width: 90%;
    position: relative;
}

/* 添加图标到标题 */
h2::before {
    content: "⭐ ";
    margin-right: 10px;
}

/* 表单容器 */
form {
    background-color: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    width: 90%;
    max-width: 650px;
    margin: 20px auto;
    transition: all 0.3s ease;
    border-top: 5px solid #9b59b6;
}

form:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
}

/* 文件上传区域 */
input[type="file"] {
    width: 100%;
    padding: 18px 20px;
    margin-bottom: 30px;
    border: 2px dashed #9b59b6;
    border-radius: 14px;
    background-color: rgba(155, 89, 182, 0.05);
    font-size: 1rem;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    background-color: rgba(155, 89, 182, 0.1);
    border-color: #8e44ad;
}

input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-right: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3);
}

/* 单选按钮组容器 */
form > input[type="radio"] {
    display: inline-block;
    margin: 10px 5px 10px 0;
}

/* 单选按钮标签样式 - 美化radio */
form > input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #9b59b6;
    border-radius: 50%;
    margin-right: 5px;
    margin-left: 15px;
    position: relative;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.2s ease;
}

form > input[type="radio"]:first-of-type {
    margin-left: 0;
}

form > input[type="radio"]:checked {
    background-color: #9b59b6;
    border-color: #9b59b6;
    box-shadow: inset 0 0 0 3px white;
}

form > input[type="radio"]:hover {
    border-color: #8e44ad;
    transform: scale(1.1);
}

/* 提交按钮样式 */
input[type="submit"] {
    display: block;
    width: 100%;
    padding: 16px 20px;
    margin-top: 30px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(155, 89, 182, 0.3);
    letter-spacing: 1px;
}

input[type="submit"]:hover {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(155, 89, 182, 0.4);
}

input[type="submit"]:active {
    transform: translateY(1px);
}

/* 添加按钮图标 */
input[type="submit"]::before {
    content: "🔄 ";
    margin-right: 8px;
}

/* 空div的隐藏 */
div:empty {
    display: none;
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
    body {
        padding-top: 100px;
    }
    
    /* 导航栏在小屏幕上垂直堆叠 */
    body > a:not([href='/xsx']) {
        position: fixed;
        display: block;
        width: 100% !important;
        left: 0 !important;
        top: auto;
        padding: 8px 12px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 0.8rem;
        height: 36px;
        text-align: left;
        padding-left: 20px;
    }
    
    /* 为每个导航链接设置垂直位置 - 8个链接 */
    body > a[href='/']:not([href='/xsx']) {
        top: 0;
    }
    
    body > a[href='/publicShare']:not([href='/xsx']) {
        top: 36px;
    }
    
    body > a[href='/article']:not([href='/xsx']) {
        top: 72px;
    }
    
    body > a[href='/chat']:not([href='/xsx']) {
        top: 108px;
    }
    
    body > a[href='/tools']:not([href='/xsx']) {
        top: 144px;
    }
    
    body > a[href='/login']:not([href='/xsx']) {
        top: 180px;
    }
    
    body > a[href='/signUp']:not([href='/xsx']) {
        top: 216px;
    }
    
    body > a[href='/comment']:not([href='/xsx']) {
        top: 252px;
    }
    
    /* xsx图片链接在移动端调整位置 */
    body > a[href='/xsx'] {
        position: fixed;
        top: 0;
        right: 0;
        width: 45px;
        height: 36px;
    }
    
    h2 {
        margin-top: 80px;
        font-size: 1.8rem;
    }
    
    form {
        padding: 25px;
        margin: 15px auto;
        width: 95%;
    }
    
    input[type="file"] {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    input[type="file"]::file-selector-button {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    form > input[type="radio"] {
        margin-left: 12px;
        margin-bottom: 8px;
    }
    
    form > input[type="radio"]:first-of-type {
        margin-left: 0;
    }
    
    input[type="submit"] {
        padding: 14px;
        font-size: 1.1rem;
    }
}

/* 平板设备 */
@media (min-width: 769px) and (max-width: 1024px) {
    body > a:not([href='/xsx']) {
        font-size: 0.7rem;
        padding: 10px 4px;
        height: 42px;
    }
    
    h2 {
        font-size: 2.5rem;
    }
    
    form {
        max-width: 550px;
        padding: 30px;
    }
}

/* 桌面端优化 */
@media (min-width: 1025px) {
    body > a:not([href='/xsx']) {
        padding: 12px 8px;
        font-size: 0.8rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

h2, form {
    animation: fadeInUp 0.6s ease-out;
}

body > a:not([href='/xsx']) {
    animation: slideInFromTop 0.5s ease-out;
}

form {
    animation-delay: 0.15s;
}

/* 添加装饰元素 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #9b59b6, #3498db, #2ecc71, #f39c12);
    z-index: 1002;
}

/* 添加页面背景装饰点 */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(155, 89, 182, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 30%, rgba(52, 152, 219, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 50% 80%, rgba(46, 204, 113, 0.05) 0%, transparent 20%);
    z-index: -1;
    pointer-events: none;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #9b59b6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8e44ad;
}

/* 选中文本样式 */
::selection {
    background-color: #9b59b6;
    color: white;
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    body > a:not([href='/xsx']) {
        font-size: 0.7rem;
        padding: 6px 10px;
        height: 32px;
    }
    
    body > a[href='/']:not([href='/xsx']) {
        top: 0;
    }
    
    body > a[href='/publicShare']:not([href='/xsx']) {
        top: 32px;
    }
    
    body > a[href='/article']:not([href='/xsx']) {
        top: 64px;
    }
    
    body > a[href='/chat']:not([href='/xsx']) {
        top: 96px;
    }
    
    body > a[href='/tools']:not([href='/xsx']) {
        top: 128px;
    }
    
    body > a[href='/login']:not([href='/xsx']) {
        top: 160px;
    }
    
    body > a[href='/signUp']:not([href='/xsx']) {
        top: 192px;
    }
    
    body > a[href='/comment']:not([href='/xsx']) {
        top: 224px;
    }
    
    body > a[href='/xsx'] {
        width: 40px;
        height: 32px;
    }
    
    h2 {
        font-size: 1.6rem;
        margin-top: 70px;
    }
    
    form {
        padding: 20px;
    }
    
    form > input[type="radio"] {
        margin-left: 8px;
        margin-right: 3px;
        width: 16px;
        height: 16px;
    }
    
    input[type="submit"] {
        padding: 12px;
        font-size: 1rem;
    }
}

/* 添加平滑滚动效果 */
html {
    scroll-behavior: smooth;
}

/* 文件上传区域添加提示 */
input[type="file"] {
    position: relative;
}

/* 单选按钮组布局优化 */
form > input[type="radio"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========= 移动端折叠/展开按钮样式 ========= */
.nav-toggle-btn {
    display: none;
    position: fixed;
    top: 5px;
    left: 10px;
    z-index: 1002;
    width: 44px;
    height: 44px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.nav-toggle-btn:hover {
    background: #8e44ad;
    transform: scale(1.02);
}

/* 移动端显示按钮 */
@media (max-width: 768px) {
    .nav-toggle-btn {
        display: block;
    }
}

/* 小屏手机适配 */
@media (max-width: 480px) {
    .nav-toggle-btn {
        width: 38px;
        height: 38px;
        font-size: 24px;
        top: 3px;
        left: 8px;
    }
}

/* ========= 移动端折叠/展开功能（默认展开，可收缩） ========= */
@media (max-width: 768px) {
    /* 导航栏默认展开状态 */
    body > a:not([href='/xsx']) {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    }
    
    /* 收缩状态：点击按钮后隐藏 */
    body.nav-collapsed > a:not([href='/xsx']) {
        transform: translateX(-100%);
        opacity: 0;
        visibility: hidden;
    }
}

/* ========= 桌面端：鼠标放在"文章"上时展开显示"随笔"链接 ========= */
@media (min-width: 769px) {
    /* 默认隐藏随笔导航项 */
    body > a[href='/essay'] {
        display: none !important;
        opacity: 0;
        visibility: hidden;
        position: fixed;
        top: 38px;
        left: 20%;
        width: 8%;
        min-width: 60px;
        background-color: rgba(52, 73, 94, 0.98);
        backdrop-filter: blur(12px);
        border-radius: 0 0 8px 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        height: 40px;
        line-height: 40px;
        padding: 0 6px;
        font-size: 0.75rem;
        text-align: center;
        z-index: 999;
        transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
        transform: translateY(-10px);
        pointer-events: none;
    }
    
    /* 当鼠标悬浮在"文章"链接上时，显示"随笔"链接 */
    body > a[href='/article']:hover ~ a[href='/essay'],
    body > a[href='/article']:hover + a[href='/essay'] {
        display: inline-block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }
    
    /* 当鼠标移动到"随笔"链接上时，保持展开状态 */
    body > a[href='/essay']:hover {
        display: inline-block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
        background-color: #e67e22;
    }
    
    /* 文章链接悬浮时改变背景色 */
    body > a[href='/article']:hover {
        background-color: #e67e22;
    }
    
    /* 随笔链接悬停效果 */
    body > a[href='/essay']:hover {
        background-color: #e67e22 !important;
        transform: translateY(2px);
    }
}

/* 动画 */
@keyframes essayDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}