/* ==========================================================================
   Character Database Panel Styles
   ========================================================================== */

/* Search Bar */
.op-char-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #13151f;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 14px;
    transition: border-color 0.2s;
}
.op-char-search-wrap:focus-within {
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}
.op-char-search-icon { font-size: 13px; color: rgba(255,255,255,0.3); flex-shrink: 0; }
.op-char-search-input {
    flex: 1; background: none; border: none; outline: none;
    color: #ffffff; font-family: 'Outfit', sans-serif;
    font-size: 13px; font-weight: 500;
}
.op-char-search-input::placeholder { color: rgba(255,255,255,0.28); }
.op-char-search-clear {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,0.3); font-size: 12px; padding: 2px;
    transition: color 0.2s;
}
.op-char-search-clear:hover { color: rgba(255,255,255,0.7); }

/* Filter Pills */
.op-char-filters {
    display: flex; flex-wrap: wrap; gap: 7px;
    margin-bottom: 14px;
}
.op-char-filter {
    background: #1c1f2b;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    color: rgba(255,255,255,0.55);
    font-family: 'Outfit', sans-serif;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    padding: 5px 13px; cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.op-char-filter:hover { background: #252838; color: #ffffff; border-color: rgba(255,255,255,0.2); }
.op-char-filter.active {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.3);
    color: #ffffff;
}

/* Results meta */
.op-char-results-meta {
    font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
    color: rgba(255,255,255,0.3);
    margin-bottom: 12px;
}

/* Character Cards Grid */
.op-char-db-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
@media (min-width: 560px) {
    .op-char-db-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
    .op-char-db-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Empty state */
.op-char-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.3);
}
.op-char-empty i { font-size: 28px; margin-bottom: 10px; display: block; }
.op-char-empty p { font-size: 13px; }

/* New Character Card style matching the user's uploaded image */
.op-char-card-new {
    background: #1c1f2b;
    border-radius: 28px;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
}
.op-char-card-new:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.6), 0 0 0 2px var(--char-clr);
    border-color: transparent;
}
.op-char-card-media {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.op-char-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.op-char-card-new:hover .op-char-card-img {
    transform: scale(1.05);
}
.op-char-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
}
.op-char-card-overlay-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 12px 12px;
    background: linear-gradient(to top, rgba(15, 17, 26, 0.95) 0%, rgba(15, 17, 26, 0.4) 60%, rgba(15, 17, 26, 0) 100%);
    text-align: center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.op-char-card-name-text {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Character Card */
.op-char-card {
    background: #13151f;
    border: 1px solid rgba(255,255,255,0.06);
    border-top: 3px solid var(--char-clr);
    border-radius: 14px;
    padding: 14px 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
    display: flex; flex-direction: column; gap: 10px;
}
.op-char-card:hover {
    transform: translateY(-4px);
    background: #181b27;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 1px var(--char-clr);
}

.op-char-card-top {
    display: flex; align-items: center; gap: 10px;
}
.op-char-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--char-clr) 0%, rgba(0,0,0,0.6) 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #ffffff;
    flex-shrink: 0; letter-spacing: 0.5px;
    box-shadow: 0 0 12px rgba(0,0,0,0.4);
}
.op-char-card-info { flex: 1; min-width: 0; }
.op-char-card-name {
    font-size: 12px; font-weight: 800; color: #ffffff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.op-char-card-epithet {
    font-size: 9.5px; color: var(--char-clr);
    font-style: italic; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.op-char-card-crew {
    font-size: 9px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.4px; color: rgba(255,255,255,0.3);
    margin-top: 2px;
}

.op-char-card-mid {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.op-char-bounty-row {
    display: flex; align-items: center; gap: 5px;
    font-size: 10px; color: rgba(255,255,255,0.5);
}
.op-char-bounty-row i { font-size: 9px; color: #ffc107; }
.op-char-bounty-val { font-weight: 700; color: #ffc107; font-size: 11px; }

/* Haki dots */
.op-char-haki-row { display: flex; gap: 3px; }
.op-haki-dot {
    width: 20px; height: 20px; border-radius: 50%;
    font-size: 9px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    letter-spacing: 0;
}
.op-haki-coc { background: rgba(255,196,0,0.15); color: #ffc400; border: 1px solid rgba(255,196,0,0.4); }
.op-haki-arm { background: rgba(50,50,80,0.6); color: #b0b8d0; border: 1px solid rgba(150,160,200,0.3); }
.op-haki-obs { background: rgba(100,200,100,0.1); color: #81c784; border: 1px solid rgba(100,200,100,0.3); }

.op-char-card-bot {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.op-cc-badge {
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; padding: 3px 8px; border-radius: 4px;
}
.op-cc-df-badge { background: rgba(255,100,50,0.12); color: #ff8a65; border: 1px solid rgba(255,100,50,0.2); }
.op-cc-nodf-badge { background: rgba(100,180,100,0.1); color: #81c784; border: 1px solid rgba(100,180,100,0.2); }
.op-char-see-more { font-size: 11px; color: rgba(255,255,255,0.25); }

/* ==========================================================================
   Character Detail Drawer
   ========================================================================== */
.op-char-detail-drawer {
    display: none;
    background: #0f111a;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    animation: panel-in 0.3s ease;
    margin-top: 10px;
}
.op-char-detail-drawer.active { display: block; }

.op-char-detail-close {
    position: absolute;
    display: none; /* handled via relative positioning inside detail-header */
}

/* Detail Header */
.op-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 20px 16px;
    background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    position: relative;
    border-top: 4px solid var(--char-clr);
}
.op-char-detail-close {
    display: block;
    position: absolute; top: 14px; right: 14px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%; width: 28px; height: 28px;
    color: rgba(255,255,255,0.6); font-size: 11px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.op-char-detail-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

.op-detail-avatar {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--char-clr) 0%, rgba(0,0,0,0.7) 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800; color: #fff;
    flex-shrink: 0; box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.op-detail-name { font-size: 18px; font-weight: 800; color: #fff; margin: 0 0 2px; }
.op-detail-epithet { font-size: 11px; color: var(--char-clr); font-style: italic; margin-bottom: 3px; }
.op-detail-crew { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: rgba(255,255,255,0.35); }

/* Detail Sections */
.op-detail-sections {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.op-detail-block {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.op-detail-block:last-child { border-bottom: none; }

.op-detail-block-title {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.5px; color: rgba(255,255,255,0.4);
    margin-bottom: 12px; display: flex; align-items: center; gap: 7px;
}
.op-detail-block-title i { font-size: 10px; }

/* Bounty Timeline */
.op-bounty-timeline { display: flex; flex-direction: column; gap: 6px; }
.op-bh-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 10px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border-left: 2px solid rgba(255,255,255,0.08);
    transition: background 0.15s;
}
.op-bh-row.op-bh-current {
    background: rgba(255,196,0,0.06);
    border-left-color: #ffc107;
}
.op-bh-arc { font-size: 11px; color: rgba(255,255,255,0.5); }
.op-bh-val { font-size: 12px; font-weight: 800; color: #ffc107; }
.op-bh-current .op-bh-val { color: #ffd740; }
.op-bh-current .op-bh-arc { color: rgba(255,255,255,0.8); font-weight: 600; }

/* Haki Section */
.op-detail-haki { display: flex; flex-direction: column; gap: 7px; }
.op-haki-type {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 8px;
    font-size: 12px; font-weight: 600;
}
.op-haki-type--coc { background: rgba(255,196,0,0.08); color: #ffc400; border: 1px solid rgba(255,196,0,0.15); }
.op-haki-type--arm { background: rgba(160,170,220,0.08); color: #b0b8d0; border: 1px solid rgba(160,170,220,0.15); }
.op-haki-type--obs { background: rgba(100,200,100,0.08); color: #81c784; border: 1px solid rgba(100,200,100,0.15); }
.op-haki-note { font-size: 11px; color: rgba(255,255,255,0.45); padding-left: 10px; }

/* Devil Fruit Section */
.op-detail-df { display: flex; flex-direction: column; gap: 8px; }
.op-df-name { font-size: 14px; font-weight: 800; color: #fff; }
.op-df-type-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 4px 10px; border-radius: 20px;
    background: rgba(255,100,50,0.1); color: #ff8a65;
    border: 1px solid rgba(255,100,50,0.2);
    align-self: flex-start;
}
.op-df-desc { font-size: 12px; color: rgba(255,255,255,0.55); line-height: 1.6; margin: 0; }
.op-detail-df--none {
    font-size: 12px; color: rgba(255,255,255,0.35);
    display: flex; align-items: center; gap: 8px;
    padding: 10px 0;
}
.op-detail-df--none i { font-size: 14px; }

/* Power System Database Styles */
.op-power-db-container {
    padding: 10px 0;
}
.op-power-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 768px) {
    .op-power-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
.op-power-card {
    background: #13151f;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}
.op-power-card--haki {
    border-top: 4px solid #ff5421;
}
.op-power-card--df {
    border-top: 4px solid #ab47bc;
}
.op-power-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.op-power-card-header i {
    font-size: 20px;
}
.op-power-card--haki .op-power-card-header i { color: #ff5421; }
.op-power-card--df .op-power-card-header i { color: #ab47bc; }
.op-power-card-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}
.op-power-intro {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255,255,255,0.7);
    margin: 0;
}
.op-power-types {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.op-power-type-item {
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
    padding: 14px;
    border-left: 3px solid rgba(255,255,255,0.1);
    position: relative;
}
.op-power-card--haki .op-power-type-item {
    border-left-color: rgba(255, 84, 33, 0.4);
}
.op-power-card--df .op-power-type-item {
    border-left-color: rgba(171, 71, 188, 0.4);
}
.op-power-type-item strong {
    font-size: 13px;
    color: #ffffff;
    display: block;
    margin-bottom: 6px;
}
.op-power-type-item p {
    font-size: 11.5px;
    line-height: 1.5;
    color: rgba(255,255,255,0.55);
    margin: 0;
}

/* ==========================================================================
   New Streetwear Collab Detail Header Redesign
   ========================================================================== */
.op-detail-header-new {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: #f3f3f3; /* off-white/light-grey */
    border-bottom: 2px solid #e2e2e2;
    position: relative;
    overflow: hidden;
    color: #000000;
    font-family: 'Outfit', sans-serif;
    min-height: 120px;
}

.op-detail-avatar-pill-container {
    position: relative;
    flex-shrink: 0;
}

.op-detail-avatar-pill {
    width: 130px;
    height: 80px;
    border-radius: 40px;
    background: #e9e9e9;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.op-detail-avatar-pill--square {
    width: 80px;
    height: 80px;
    border-radius: 16px;
}

.op-detail-avatar-pill-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.op-detail-avatar-pill-placeholder {
    font-size: 26px;
    font-weight: 800;
    color: #555555;
    letter-spacing: 1px;
}

/* Starburst Badge styling */
.op-starburst-container {
    position: absolute;
    top: -12px;
    right: -10px;
    width: 44px;
    height: 44px;
    z-index: 10;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.12));
}

.op-starburst-svg {
    width: 100%;
    height: 100%;
}

/* Middle info stack */
.op-detail-info-new {
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 5;
    min-width: 0;
}

.op-detail-name-new {
    font-size: 22px;
    font-weight: 800;
    color: #000000;
    margin: 0 0 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.1;
}

.op-detail-subtitle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.op-detail-jp-tag {
    font-size: 14px;
    font-weight: 800;
    color: #000000;
}

/* Yellow highlighted role block */
.op-role-highlight-box {
    background: #ffe300; /* bright yellow highlighter */
    color: #000000;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    transform: rotate(-1.5deg);
    box-shadow: 1px 2px 5px rgba(0,0,0,0.05);
}

.op-detail-katakana-new {
    font-size: 12px;
    font-weight: 500;
    color: #888888;
}

/* Faint background text on right */
.op-faint-bg-container {
    position: absolute;
    right: 24px;
    bottom: -15px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
    user-select: none;
}

.op-faint-index-new {
    font-size: 14px;
    font-weight: 700;
    color: #000000;
    opacity: 0.12;
    margin-right: 12px;
    margin-bottom: -10px;
}

.op-faint-hiragana-new {
    font-size: 96px;
    font-weight: 800;
    color: #000000;
    opacity: 0.06;
    line-height: 1;
    letter-spacing: -2px;
}

/* Close button custom overrides for off-white header */
.op-char-detail-drawer .op-char-detail-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    color: #333333 !important;
    font-size: 11px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    z-index: 50 !important;
}

.op-char-detail-drawer .op-char-detail-close:hover {
    background: rgba(0, 0, 0, 0.12) !important;
    color: #000000 !important;
}

/* Card Flip detail drawer container overrides */
.op-char-detail-drawer {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(12, 13, 16, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    overflow-y: auto !important;
    padding: 40px 0 !important;
    box-sizing: border-box !important;
    margin-top: 0 !important;
    z-index: 10000 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    animation: panel-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.op-char-detail-drawer.active {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.op-char-detail-drawer .op-char-detail-close {
    display: none !important; /* Hide original close button */
}

#charDetailContent, #sagaDetailContent, #dfDetailContent, #islandDetailContent, #shipDetailContent, #trailerDetailContent, #castDetailContent {
    width: 100% !important;
    margin: auto !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
}

/* COLLECTIBLE CARD FLIP CSS */
.op-flip-card-container {
    perspective: 1000px;
    -webkit-perspective: 1000px;
    width: 90%;
    max-width: 360px;
    height: 540px;
    margin: 20px auto;
    position: relative;
    z-index: 10;
}

.op-flip-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.op-flip-card-inner.flipped {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

.op-flip-card-front,
.op-flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 24px;
    border: 1px solid #dcdcdc;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fafafa;
    color: #000000;
}

.op-flip-card-back {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    background: #f5f5f5;
}

/* Front Face Illustration Area */
.op-card-front-illustration {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}

.op-card-illustration-img {
    height: 90%;
    max-height: 280px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.op-flip-card-inner:hover .op-card-illustration-img {
    transform: scale(1.03);
}

.op-card-illustration-placeholder {
    font-size: 80px;
    font-weight: 900;
    opacity: 0.1;
    color: #000;
}

/* Front Face Footer */
.op-card-front-footer {
    height: 50px;
    padding: 0 24px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.op-card-footer-logo {
    display: flex;
    align-items: center;
}

.op-card-footer-tag {
    font-size: 9px;
    font-weight: 800;
    color: #888888;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.op-card-footer-symbol {
    display: flex;
    align-items: center;
    color: #111;
}

/* Back Face Styling */
.op-card-back-header {
    padding: 24px 24px 16px;
    background: #f3f3f3;
    border-bottom: 2px solid #e2e2e2;
    flex-shrink: 0;
    text-align: left;
}

.op-card-back-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #000;
}

.op-card-back-subtitle {
    font-size: 10px;
    font-weight: 700;
    color: #888888;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 2px;
}

.op-card-back-body {
    flex-grow: 1;
    padding: 20px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.op-card-back-section {
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 14px;
    position: relative;
}

.op-card-back-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.op-card-back-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #4b5563;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.op-card-back-abilities-text {
    font-size: 12.5px;
    line-height: 1.6;
    color: #374151;
    margin: 0;
    font-weight: 500;
}

.op-card-back-footer {
    height: 44px;
    background: #eaeaea;
    border-top: 1px solid #dcdcdc;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 800;
    color: #6b7280;
    letter-spacing: 1.5px;
    flex-shrink: 0;
}

/* Close button on card wrap */
.op-card-close-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    color: #333333;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 100;
    transition: all 0.2s;
}

.op-card-close-btn:hover {
    background: #f3f3f3;
    color: #000;
    transform: scale(1.05);
}

/* Haki types inside card back */
.op-card-back-body .op-haki-type--coc {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

.op-card-back-body .op-haki-type--arm {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

.op-card-back-body .op-haki-type--obs {
    background: #f0fdf4 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
}

.op-card-back-body .op-df-name {
    color: #111827 !important;
    font-weight: 700;
}

.op-card-back-body .op-df-type-badge {
    background: transparent !important;
    color: #9ca3af !important;
    border: none !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 2px 0;
    border-radius: 0;
    align-self: flex-start;
}

.op-card-back-body .op-df-desc {
    color: #4b5563 !important;
    font-weight: 500;
    line-height: 1.5;
    margin: 8px 0 0;
    font-size: 12.5px;
}

.op-card-back-body .op-detail-df--none {
    color: #6b7280 !important;
    font-weight: 500;
    font-size: 12.5px;
}

.op-df-thumbnail {
    position: absolute;
    top: 14px;
    right: 0;
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    transition: transform 0.2s ease-in-out;
}

.op-df-thumbnail:hover {
    transform: scale(1.08);
}

/* --- EPISODE ABILITY TRACKING STYLES --- */
.op-abilities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.op-ability-card-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.op-ability-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.op-ab-cat-badge {
    font-size: 8.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.op-ab-ep-badge {
    background: rgba(17, 24, 39, 0.08);
    color: #111827;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.op-ab-visual-container {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.op-ab-visual-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.op-ab-visual-container:hover img {
    transform: scale(1.05);
}

.op-gif-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}/* ─── DARK MODE: One Piece Trading Card ─── */
/* Dark mode = no .light-mode class on body */

body:not(.light-mode) .op-flip-card-front,
body:not(.light-mode) .op-flip-card-back {
    background: #0f1013;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.12);
}

body:not(.light-mode) .op-flip-card-back {
    background: #0b0c10;
}

body:not(.light-mode) .op-detail-header-new {
    background: linear-gradient(180deg, rgba(22, 23, 29, 0.95), rgba(15, 16, 20, 0.98));
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body:not(.light-mode) .op-detail-name-new {
    color: #ffffff;
}

body:not(.light-mode) .op-detail-jp-tag {
    color: rgba(255, 255, 255, 0.7);
}

body:not(.light-mode) .op-detail-katakana-new {
    color: rgba(255, 255, 255, 0.4);
}

body:not(.light-mode) .op-faint-index-new,
body:not(.light-mode) .op-faint-hiragana-new {
    color: #ffffff;
}

body:not(.light-mode) .op-card-front-illustration {
    /* Keep character-specific background tint */
}

body:not(.light-mode) .op-card-front-footer {
    background: #111215;
    border-top-color: rgba(255, 255, 255, 0.08);
}

body:not(.light-mode) .op-card-footer-tag {
    color: rgba(255, 255, 255, 0.4);
}

body:not(.light-mode) .op-card-footer-symbol {
    color: rgba(255, 255, 255, 0.6);
}

/* Back face dark mode */
body:not(.light-mode) .op-card-back-header {
    background: rgba(22, 23, 29, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body:not(.light-mode) .op-card-back-title {
    color: #ffffff;
}

body:not(.light-mode) .op-card-back-subtitle {
    color: rgba(255, 255, 255, 0.4);
}

body:not(.light-mode) .op-card-back-body {
    background: #0b0c10;
}

body:not(.light-mode) .op-card-back-section {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

body:not(.light-mode) .op-card-back-section-title {
    color: rgba(255, 255, 255, 0.5);
}

body:not(.light-mode) .op-card-back-abilities-text {
    color: rgba(255, 255, 255, 0.75);
}

body:not(.light-mode) .op-card-back-footer {
    background: #111215;
    border-top-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.35);
}

body:not(.light-mode) .op-card-back-body .op-card-back-section p {
    color: rgba(255, 255, 255, 0.7) !important;
}

body:not(.light-mode) .op-card-back-body .op-df-name {
    color: #ffffff !important;
}

body:not(.light-mode) .op-card-back-body .op-df-desc {
    color: rgba(255, 255, 255, 0.6) !important;
}

body:not(.light-mode) .op-card-back-body .op-detail-df--none {
    color: rgba(255, 255, 255, 0.4) !important;
}

body:not(.light-mode) .op-ability-card-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

body:not(.light-mode) .op-ab-ep-badge {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

body:not(.light-mode) .op-card-close-btn {
    background: #1a1b1f;
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

body:not(.light-mode) .op-card-close-btn:hover {
    background: #252629;
    color: #ffffff;
}

