/* ==========================================================================
   MU ONLINE - VISUAL MARKETPLACE PREMIUM CSS
   Style: Steam Market / PoE / Diablo IV Auction House
   ========================================================================== */

   .mk-layout {
    font-family: 'Inter', 'Roboto', sans-serif;
    background: #09090b;
    color: #f8f9fa;
    min-height: calc(100vh - 80px);
    padding: 30px;
}

/* HEADER */
.mk-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mk-header-title h1 {
    font-size: 36px;
    font-weight: 900;
    margin: 0;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.mk-header-title h1 span {
    color: #c0c0c0;
}

.mk-header-title p {
    color: rgba(255, 255, 255, 0.4);
    margin: 5px 0 0;
    font-size: 14px;
}

/* BUTTONS */
.mk-btn {
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mk-btn-publish {
    background: linear-gradient(135deg, #c0c0c0, #fcc419);
    color: #000;
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.3);
}

.mk-btn-publish:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 192, 192, 0.5);
}

/* BODY LAYOUT */
.mk-body {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* SIDEBAR FILTERS */
.mk-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

.mk-search-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.mk-search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
}

.mk-search-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 10px 10px 35px;
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.3s;
}

.mk-search-wrapper input:focus {
    outline: none;
    border-color: #c0c0c0;
}

.mk-filter-group {
    margin-bottom: 25px;
}

.mk-filter-group h4 {
    font-size: 13px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mk-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mk-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
}

.mk-checkbox:hover {
    color: #fff;
}

.mk-checkbox input {
    display: none;
}

.mk-checkmark {
    width: 16px;
    height: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mk-checkbox input:checked + .mk-checkmark {
    background: #c0c0c0;
    border-color: #c0c0c0;
}

/* RARITY COLORS */
.mk-rarity-normal .mk-rarity-text { color: #fff; }
.mk-rarity-excellent .mk-rarity-text { color: #51cf66; }
.mk-rarity-ancient .mk-rarity-text { color: #339af0; }
.mk-rarity-socket .mk-rarity-text { color: #cc5de8; }
.mk-rarity-legendary .mk-rarity-text { color: #fcc419; }
.mk-rarity-mythic .mk-rarity-text { color: #ff6b6b; }

/* GRID CONTAINER */
.mk-grid-container {
    flex: 1;
    min-width: 0;
}

.mk-section-title {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.mk-section-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
}

.mk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* ITEM CARD */
.mk-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.mk-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.mk-badge-vip {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #f03e3e, #d6336c);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(240, 62, 62, 0.4);
}

.mk-card-image {
    height: 180px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.mk-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

.mk-card:hover .mk-card-image img {
    transform: scale(1.1);
}

.mk-card-body {
    padding: 15px;
    flex: 1;
}

.mk-item-name {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mk-item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.mk-cat {
    color: rgba(255, 255, 255, 0.4);
}

.mk-item-price {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mk-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* RARITY CARD STYLES (Borders and glow on hover) */
.mk-rarity-excellent:hover { border-color: #51cf66; box-shadow: 0 0 20px rgba(81, 207, 102, 0.15); }
.mk-rarity-ancient:hover { border-color: #339af0; box-shadow: 0 0 20px rgba(51, 154, 240, 0.15); }
.mk-rarity-socket:hover { border-color: #cc5de8; box-shadow: 0 0 20px rgba(204, 93, 232, 0.15); }
.mk-rarity-legendary:hover { border-color: #fcc419; box-shadow: 0 0 20px rgba(252, 196, 25, 0.15); }
.mk-rarity-mythic:hover { border-color: #ff6b6b; box-shadow: 0 0 20px rgba(255, 107, 107, 0.15); }

/* MODALS */
.mk-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mk-modal.show {
    display: flex;
    animation: fadeIn 0.2s;
}

.mk-modal-content {
    background: #111115;
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mk-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 20px;
    cursor: pointer;
}

.mk-modal-close:hover {
    color: #fff;
}

.mk-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mk-modal-header h2 {
    margin: 0 0 5px;
    font-size: 24px;
    font-weight: 800;
}

.mk-modal-body {
    padding: 30px;
}

/* FORMS IN MODAL */
.mk-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.mk-input, .mk-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.mk-input:focus, .mk-select:focus {
    outline: none;
    border-color: #c0c0c0;
    background: rgba(192, 192, 192, 0.05);
}

.mk-btn-submit {
    background: #339af0;
    color: #fff;
    padding: 14px;
    font-size: 16px;
    margin-top: 20px;
}
.mk-btn-submit:hover { background: #228be6; }

/* MODAL DETAIL (Item View) */
.mk-detail-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 30px;
}

.mk-detail-image {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mk-detail-image img {
    max-width: 100%;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}

.mk-detail-info h3 {
    font-size: 24px;
    margin: 0 0 10px;
    color: #fff;
}

.mk-desc-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 20px 0;
    border-left: 3px solid #c0c0c0;
}

.mk-btn-contact {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    background: linear-gradient(135deg, #51cf66, #2b8a3e);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    display: block;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(81, 207, 102, 0.3);
}

.mk-btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(81, 207, 102, 0.5);
}

.mk-btn-contact.discord {
    background: linear-gradient(135deg, #7289da, #4e5d94);
    box-shadow: 0 4px 15px rgba(114, 137, 218, 0.3);
}

/* LIVE FEED POPUPS (Bottom Right) */
.mk-feed-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 99995;
    pointer-events: none;
}

.mk-feed-toast {
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    width: 300px;
    display: flex;
    gap: 15px;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    pointer-events: auto;
    animation: toastEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    cursor: pointer;
}

.mk-feed-toast:hover {
    background: rgba(25, 25, 30, 0.95);
    border-color: #c0c0c0;
}

.mk-feed-toast img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.mk-feed-info {
    flex: 1;
}

.mk-feed-title {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 3px;
}
.mk-feed-title span { color: #c0c0c0; font-weight: 700; }

.mk-feed-item {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
}

@keyframes toastEnter {
    from { opacity: 0; transform: translateX(50px) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastLeave {
    to { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    .mk-body { flex-direction: column; }
    .mk-sidebar { width: 100%; position: static; }
    .mk-detail-grid { grid-template-columns: 1fr; }
}
