.bazar-section {
    min-height: calc(100vh - 80px);
    padding: 140px 20px 60px;
    background: #020817 url('/image/lpw-front-background.png') center/cover no-repeat fixed;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    position: relative;
}

.bazar-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 8, 23, 0.52) 0%, rgba(2, 8, 23, 0.94) 100%);
    pointer-events: none;
    z-index: 0;
}

.bazar-section > .bazar-container {
    position: relative;
    z-index: 1;
}

.bazar-container {
    max-width: 1280px;
    margin: 0 auto;
}

.bazar-header {
    background: rgba(22, 22, 22, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.bazar-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin: 0 0 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bazar-header p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 16px;
}

.bazar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-bazar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

.btn-bazar.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.btn-bazar.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-bazar.danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
}

.btn-bazar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
    color: #fff;
}

.bazar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    background: rgba(22, 22, 22, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.bazar-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.bazar-filters label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bazar-select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
}

.bazar-select:focus {
    border-color: #3b82f6;
}

.bazar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

.bazar-card {
    background: rgba(22, 22, 22, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
}

.bazar-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.bazar-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bazar-card-id {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 600;
}

.bazar-card-price {
    color: #3b82f6;
    font-weight: 700;
}

.bazar-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.bazar-card-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    margin: 0;
    color: #fff;
}

.bazar-card-meta {
    display: flex;
    gap: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.bazar-card-meta i {
    color: #3b82f6;
    margin-right: 4px;
}

.poke-team {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.poke-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 4px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 999px;
    color: #fff;
    font-size: 0.8rem;
}

.poke-chip img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(0,0,0,0.5));
}

.poke-chip.empty {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    padding: 4px 12px;
}

.bazar-card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 18px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
}

.bazar-empty {
    text-align: center;
    padding: 60px 20px;
    background: rgba(22, 22, 22, 0.95);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: rgba(255, 255, 255, 0.6);
}

.bazar-empty i {
    font-size: 3rem;
    color: #3b82f6;
    margin-bottom: 12px;
    display: block;
}

.alert-message {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.alert-message.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-message.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.alert-message.warning {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.3);
    color: #fde68a;
}

/* Sell page */
.sell-form {
    background: rgba(22, 22, 22, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.sell-section h3 {
    margin: 0 0 6px;
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1.1rem;
}

.sell-section p {
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 14px;
    font-size: 0.9rem;
}

.char-pick {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.char-pick label {
    display: block;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: border-color .2s, transform .15s;
    color: #fff;
}

.char-pick label:hover { transform: translateY(-2px); }
.char-pick input[type="radio"] { display: none; }
.char-pick input[type="radio"]:checked + label,
.char-pick label.selected {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4);
}

.char-pick .name {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
}
.char-pick .meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-field input,
.form-field textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 12px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color .15s;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: #3b82f6;
}

.form-field textarea { min-height: 100px; resize: vertical; }

.notice {
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #fde68a;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.notice ul { margin: 6px 0 0 18px; padding: 0; }
.notice li { margin-bottom: 4px; }

.sell-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

/* Details */
.details-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .details-grid { grid-template-columns: 1fr; }
}

.details-panel {
    background: rgba(22, 22, 22, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 26px;
}

.details-panel h2 {
    margin: 0 0 16px;
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 1.4rem;
}

.stats-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stats-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.stats-list .label {
    color: rgba(255, 255, 255, 0.7);
}

.stats-list .value {
    color: #fff;
    font-weight: 600;
}

.price-tag {
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(37,99,235,0.2));
    border: 1px solid rgba(59,130,246,0.5);
    color: #93c5fd;
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 18px;
}

.price-tag .amount {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: #fff;
    display: block;
}

.price-tag .label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.poke-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.poke-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.poke-card img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.poke-card .pname {
    color: #fff;
    font-weight: 600;
    margin-top: 6px;
    text-transform: capitalize;
    font-size: 0.9rem;
}

.poke-card .plevel {
    color: rgba(59,130,246,0.9);
    font-size: 0.8rem;
}

/* My listings */
.my-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.my-card {
    background: rgba(22, 22, 22, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.my-card.status-sold { border-color: rgba(34, 197, 94, 0.4); }
.my-card.status-cancelled { border-color: rgba(239, 68, 68, 0.3); opacity: 0.85; }

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.status-badge.active { background: rgba(59,130,246,0.2); color: #93c5fd; }
.status-badge.sold { background: rgba(34,197,94,0.2); color: #86efac; }
.status-badge.cancelled { background: rgba(239,68,68,0.2); color: #fca5a5; }

.my-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    flex-wrap: wrap;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal-card {
    background: rgba(22, 22, 22, 0.98);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    max-width: 460px;
    width: 100%;
    color: #fff;
}

.modal-card h2 {
    margin: 0 0 12px;
    font-family: 'Orbitron', sans-serif;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

/* Light theme overrides */
:root[data-theme="light"] .bazar-section {
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #1f2937;
}

:root[data-theme="light"] .bazar-header,
:root[data-theme="light"] .bazar-filters,
:root[data-theme="light"] .bazar-card,
:root[data-theme="light"] .sell-form,
:root[data-theme="light"] .details-panel,
:root[data-theme="light"] .my-card,
:root[data-theme="light"] .modal-card,
:root[data-theme="light"] .bazar-empty {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1f2937;
}

:root[data-theme="light"] .bazar-card-name,
:root[data-theme="light"] .details-panel h2,
:root[data-theme="light"] .stats-list .value,
:root[data-theme="light"] .modal-card h2 {
    color: #1f2937;
}

:root[data-theme="light"] .bazar-card-meta,
:root[data-theme="light"] .stats-list .label,
:root[data-theme="light"] .bazar-card-footer,
:root[data-theme="light"] .bazar-card-id {
    color: rgba(0, 0, 0, 0.65);
}

:root[data-theme="light"] .bazar-select,
:root[data-theme="light"] .form-field input,
:root[data-theme="light"] .form-field textarea,
:root[data-theme="light"] .stats-list li {
    background: rgba(0, 0, 0, 0.05);
    color: #1f2937;
    border-color: rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .price-tag .amount {
    color: #1e3a8a;
}
