/* 按钮基础样式 */
.action-buttons {
    margin-top: 1rem;
    position: relative;
    z-index: 20;
    pointer-events: auto;  /* 确保按钮区域可以交互 */
}

.button-group {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
    position: relative;
    z-index: 20;
    pointer-events: auto;  /* 确保按钮可以交互 */
}

/* 分享按钮样式 */
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.1);
    color: rgb(var(--primary-rgb));
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;  /* 添加定位上下文 */
    z-index: 21;  /* 确保按钮在最上层 */
}

.share-btn:hover {
    transform: translateY(-2px);
    background: rgb(var(--primary-rgb));
    color: white;
}

/* 操作按钮样式 */
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: rgba(var(--primary-rgb), 0.1);
    color: rgb(var(--primary-rgb));
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 21;
}

.action-btn:hover {
    background: rgb(var(--primary-rgb));
    color: white;
    transform: translateY(-1px);
}

.action-btn:active {
    transform: translateY(0);
    opacity: 0.9;
}

/* 按钮图标样式 */
.action-btn svg {
    width: 18px;
    height: 18px;
}

.icon-brand,
.icon-x {
    width: 18px;
    height: 18px;
}

/* 显示模式切换样式 */
.display-mode {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
    height: 38px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 64px;
    height: 32px;
    margin: 0;
    border-radius: 32px;
    background: rgba(var(--primary-rgb), 0.08);
    cursor: pointer;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08),
                inset 0 -1px 2px rgba(255, 255, 255, 0.6);
}

.mode-label {
    font-size: 0.95rem;
    color: rgb(var(--primary-rgb));
    font-weight: 500;
    user-select: none;
    opacity: 0.8;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.switch:hover + .mode-label {
    opacity: 1;
    transform: translateY(-1px);
}

.switch input {
    display: none;
}

/* 滑块轨道 */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    transition: all 0.3s ease;
    border-radius: 24px;
    overflow: hidden;
}

/* 滑块圆点 */
.slider:before {
    position: absolute;
    content: "";
    width: 24px;
    height: 24px;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 选中状态 - 图片模式 */
input:checked + .slider {
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.95) 0%, rgba(var(--primary-rgb), 1) 100%);
}

/* 未选中状态 - 文字模式 */
input:not(:checked) + .slider {
    background: transparent;
}

input:checked + .slider:before {
    transform: translate(32px, -50%);
}

/* 悬浮效果 - 只改变阴影 */
.switch:hover .slider:before {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 添加动画类后的过渡效果 */
.switch.animated .slider,
.switch.animated .slider:before {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}