/* 通用样式 */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 5vh 2vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    /*add*/
    background: var(--bg-color);
    transition: background 0.3s ease;
}

/* 标题 */
h1 {
    font-size: 2.5rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 30px;
    animation: textColorChange 5s infinite linear;
}

/* 动态文字颜色动画 */
@keyframes textColorChange {
    0% { color: #FF6F61; }
    25% { color: #6B5B95; }
    50% { color: #88B04B; }
    75% { color: #F7CAC9; }
    100% { color: #FF6F61; }
}

/* 搜索框 */
#searchBox {
    width: 80%;
    max-width: 600px;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 25px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--input-border);
}

#searchBox:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}

/* 卡片容器 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    width: 90%;
    max-width: 1200px;
}

/* 卡片 */
.card {
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    font-weight: normal;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: cardTextColorChange 6s infinite linear;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--card-bg);
    color: var(--text-color);
}

/* 卡片名称样式 (新增) */
.card-name {
    font-weight: bold;
    font-size: 1rem;
    margin: auto;
}

/* 点击率显示样式 (新增) */
.card-clicks {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.75rem;
    font-weight: 300;
    color: #999;
    transition: color 0.3s ease;
}

/* 卡片动态文字颜色动画 */
@keyframes cardTextColorChange {
    0% { color: #555; }
    25% { color: #007bff; }
    50% { color: #28a745; }
    75% { color: #fd7e14; }
    100% { color: #555; }
}

/* 卡片悬停效果 */
.card:hover {
    background: #007bff;
    color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    animation: none;
}
/*底部信息*/
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
}
/*设置齿轮效果*/
.footer-box {
    position: relative;
    text-align: center;
    margin-top: 15px;
    padding-top: 5px;
    border-top: 1px solid #4444;
}

/* 齿轮容器固定在右侧 */
.settings {
    position: absolute;
    right: 20px;
    top: 65%;
    transform: translateY(-50%);
}


/* 齿轮图标基础样式 */
.gear {
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.3s ease;
}

/* 悬浮齿轮图标旋转效果 */
.settings:hover .gear {
    transform: rotate(90deg);
}

/* 上升按钮菜单 */
.menu {
    position: absolute;
    bottom: 25px;
    right: 0;
    display: flex;
    flex-direction: row;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

/* 按钮显示动画 */
.settings:hover .menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

/* 按钮外观 */
/*.menu button {
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    background: #555;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.menu button:hover {
    background: #777;
}*/
/*模态框表单开始*/
/* 背景遮罩 */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    animation: fadeIn .25s ease;
}

/* 内容框 */
.modal-box {
    background: var(--card-bg);
    color: var(--text-color);
    align-items: center;
    padding: 24px 28px;
    border-radius: 12px;
    min-width: 300px;
    box-shadow: 0 8px 35px rgba(0,0,0,0.15);
    animation: popup .25s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.modal-box h3 {
    margin-bottom: 14px;
    font-weight: 600;
}

/* 输入框 */
.modal-box input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    margin: 6px 0 14px;
    transition: border .2s;
}

.modal-box input:focus {
    border-color: #007aff;
    outline: none;
}

/* 按钮 */
.submit-btn {
    width: 50%;
    padding: 10px 12px;
    background: #007aff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s;
    display: block;
    margin: 0 auto;
}


.submit-btn:hover {
    background: #0066d8;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popup {
    from { transform: scale(.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/*模态框表单结束*/
/*联系我*/
.contact-link {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    font-weight: 400;
    border-bottom: 1px solid #e0e0e0;
    transition: color .2s, border-color .2s;
}
.contact-link:hover {
    color: #444;
    border-color: #bbb;
}
/*联系我*/

/*设置样式开始*/
/* 定义颜色变量 */
:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #555;
    --input-border: #ddd;
}

/* 暗色模式变量 */
[data-theme='dark'] {
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --text-color: #e0e0e0;
    --input-border: #444;
}
/* 设置项布局 */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

/* 滑块开关主体 */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

/* 隐藏默认复选框 */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* 滑块轨迹 */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 22px;
}

/* 滑块圆点 */
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

/* 选中状态（蓝色） */
input:checked + .slider {
    background-color: #007aff;
}

/* 选中时圆点的移动 */
input:checked + .slider:before {
    transform: translateX(22px);
}
/*设置样式结束*/