/* R18相关样式 */
.r18-badge {
    display: inline-block;
    background-color: #ff5252;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: bold;
    animation: pulse-r18 2s infinite;
}

/* R18筛选样式 */
.r18-filter {
    /* margin-right: 10px; REMOVED: gap property in container handles spacing */
    grid-column: 1; /* ADDED: Place in the first column */
    justify-self: end; /* ADDED: Align to the end of its column */
    display: flex;
    align-items: center;
    white-space: nowrap; /* 避免筛选器文字换行 */
}

.r18-filter label {
    margin-right: 8px;
    font-size: 14px;
    color: #555;
    white-space: nowrap; /* 避免文字换行 */
}

.r18-filter select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    appearance: none; /* 移除默认箭头 */
    -webkit-appearance: none; /* 移除 Safari 默认箭头 */
    -moz-appearance: none; /* 移除 Firefox 默认箭头 */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23555555' width='18px' height='18px'%3e%3cpath d='M7 10l5 5 5-5H7z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px; /* 为自定义箭头留出空间 */
}

.r18-filter select:hover {
    border-color: #1e88e5;
}

.r18-filter select:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.2);
}

.modal-r18 {
    font-size: 0.9rem;
    padding: 3px 8px;
}

@keyframes pulse-r18 {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255, 82, 82, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0);
    }
}

/* R18 开关样式 */
.r18-option {
    margin-top: 20px;
    margin-bottom: 20px;
}

.r18-toggle {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.r18-toggle input[type="checkbox"] {
    width: 0;
    height: 0;
    visibility: hidden;
    position: absolute;
}

.r18-toggle label {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding-left: 50px; /* 为开关留出足够空间 */
    user-select: none;
}

.r18-toggle label:before {
    content: '';
    width: 40px;
    height: 20px;
    background: #e0e0e0;
    position: absolute;
    left: 0;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.r18-toggle label:after {
    content: '';
    width: 16px;
    height: 16px;
    background: #fff;
    position: absolute;
    left: 2px;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.r18-toggle input:checked + label:before {
    background: #ff5252;
}

.r18-toggle input:checked + label:after {
    left: 22px;
}

.r18-help {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.8rem;
}
