* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #0c0c0e;
    --card-bg: #1a1a1c;
    --accent-color: #00f2ff;
    --bookmark-color: #B7F000;
    --reject-color: #ff3b30;
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.5);
    --border: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

header {
    background: #000;
    padding: 10px 24px;
    border-bottom: 1px solid var(--border);
}

.mini-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mini-bar h1 {
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0.8;
}

.mini-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

select,
button {
    background: #252528;
    border: 1px solid var(--border);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-color);
    color: #000;
    font-weight: 700;
    border: none;
}

#filter-panel {
    display: none;
    background: #111;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

#filter-panel.is-open {
    display: block;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
}

.control-group label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 700;
}

details {
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid var(--border);
}

summary {
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--accent-color);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 24px;
}

/* 画像カード */
.image-card {
    position: relative;
    background: var(--card-bg);
    border: 3px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ブックマークON：枠線が黄緑に発光 */
.image-card.is-bookmarked {
    border-color: var(--bookmark-color);
    box-shadow: 0 0 25px rgba(183, 240, 0, 0.5);
}

.img-wrapper {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #000;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

/* 除外ON：画像を薄く */
.image-card.is-rejected img {
    opacity: 0.2;
    filter: grayscale(1);
}

/* 14pxの超太い赤スラッシュ */
.red-slash {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 14px;
    background: var(--reject-color);
    transform: translate(-50%, -50%) rotate(45deg);
    opacity: 0;
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 0 20px rgba(255, 59, 48, 0.8);
    transition: opacity 0.2s ease;
}

.image-card.is-rejected .red-slash {
    opacity: 0.95;
}

/* アクションボタン (常時表示) */
.card-actions {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    z-index: 100;
    pointer-events: none;
}

.icon-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    transition: all 0.2s;
}

.icon-btn svg {
    width: 22px;
    height: 22px;
}

/* SVG内指定を強制無視して白で表示 */
.icon-btn svg path {
    fill: #fff !important;
    stroke: none !important;
}

/* 除外ボタン：アクティブで赤 */
.icon-btn.btn-reject:hover,
.image-card.is-rejected .icon-btn.btn-reject {
    background: var(--reject-color) !important;
    border-color: var(--reject-color) !important;
}

/* ブックマークボタン：アクティブで黄緑・アイコン黒 */
.icon-btn.btn-bookmark:hover,
.image-card.is-bookmarked .icon-btn.btn-bookmark {
    background: var(--bookmark-color) !important;
    border-color: var(--bookmark-color) !important;
}

.image-card.is-bookmarked .icon-btn.btn-bookmark svg path {
    fill: #000 !important;
}

/* 下部情報 */
.card-info {
    padding: 12px;
}

.no-badge {
    font-size: 0.65rem;
    background: #fff;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 900;
}

.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.tag {
    font-size: 0.6rem;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
    border: 1px solid transparent;
}

.filename {
    font-size: 0.6rem;
    opacity: 0.3;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}