.user-info { 
    background: rgba(0,0,0,0.7); 
    color: white; 
    padding: 15px; 
    border-radius: 5px; 
    margin-bottom: 20px; 
    text-align: center;
}

.categories { 
    margin-bottom: 15px; 
    text-align: center;
    padding: 5px;
}

.categories a { 
    display: inline-flex;
    align-items: center;
    padding: 3px 8px; 
    margin: 2px; 
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.9) 0%, rgba(41, 128, 185, 0.9) 100%);
    color: white; 
    text-decoration: none; 
    border-radius: 4px; 
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    font-size: 11px;
    position: relative;
    overflow: hidden;
}

.categories a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.categories a:hover::before {
    left: 100%;
}

.categories a.active, .categories a:hover { 
    background: linear-gradient(135deg, rgba(41, 128, 185, 1) 0%, rgba(52, 152, 219, 1) 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(41, 128, 185, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.categories a img {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)) brightness(1.1);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.categories a:hover img {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)) brightness(1.2);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.categories a.active img {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.categories a.admin-link {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.9) 0%, rgba(192, 57, 43, 0.9) 100%);
}

.categories a.admin-link:hover {
    background: linear-gradient(135deg, rgba(192, 57, 43, 1) 0%, rgba(231, 76, 60, 1) 100%);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.4);
}

.products-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; 
    margin-top: 20px;
    max-width: 100%;
}

@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

.product-card { 
    background: rgba(255,255,255,0.95); 
    border: 2px solid rgba(52, 152, 219, 0.3); 
    border-radius: 10px; 
    padding: 12px; 
    text-align: center; 
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    transition: all 0.3s;
    height: 380px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    border-color: rgba(52, 152, 219, 0.8);
}

.currency-icon { 
    width: 20px; 
    height: 20px; 
    vertical-align: middle; 
    margin-right: 5px;
    display: inline-block;
}

.currency-icon-small { 
    width: 16px; 
    height: 16px; 
    vertical-align: middle; 
    margin-right: 3px;
    display: inline-block;
}

.product-image { 
    width: 70px; 
    height: 70px; 
    margin: 0 auto 12px; 
    background: rgba(0,0,0,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-width: 70px;
    max-height: 70px;
}

.product-name { 
    font-weight: bold; 
    margin-bottom: 8px; 
    color: #2c3e50;
    font-size: 13px;
    line-height: 1.2;
}

.item-stats {
    background: rgba(0, 0, 0, 0.7);
    padding: 6px;
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 10px;
    line-height: 1.3;
    max-height: 100px;
    overflow-y: auto;
}

.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 3px;
}

.stat-item {
    font-weight: bold;
    font-size: 9px;
}

.stat-name {
    color: #ffff00;
    font-weight: bold;
}

.stat-base {
    color: #ffffff;
    font-weight: bold;
}

.stat-craft {
    color: #ff8c00;
    font-weight: bold;
}

.stat-gem {
    color: #ff00ff;
    font-weight: bold;
}

.enchant-display {
    color: #00ff00;
    font-weight: bold;
    font-size: 12px;
    margin: 5px 0;
    text-align: center;
}

.gems-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.gem-item {
    position: relative;
    display: inline-block;
}

.gem-icon {
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid rgba(255, 140, 0, 0.5);
    border-radius: 4px;
    cursor: help;
}

.gem-tooltip {
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: center;
    padding: 5px 10px;
    border-radius: 6px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid #ff8c00;
}

.gem-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #ff8c00 transparent transparent transparent;
}

.gem-item:hover .gem-tooltip {
    visibility: visible;
}

.item-slots {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.slot-box {
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    display: inline-block;
    position: relative;
    cursor: help;
}

.slot-box.filled {
    background: rgba(0, 0, 0, 0.7);
    border-color: #ff8c00;
    box-shadow: 0 0 5px rgba(255, 140, 0, 0.5);
}

.product-description {
    font-size: 11px; 
    color: #666; 
    margin-bottom: 8px;
    min-height: 30px;
    line-height: 1.2;
}

.product-price { 
    color: #e74c3c; 
    font-size: 15px; 
    font-weight: bold; 
    margin-bottom: 8px; 
}

.buy-btn { 
    background: linear-gradient(45deg, #2980b9, #3498db); 
    color: white; 
    border: none; 
    padding: 8px 14px; 
    border-radius: 6px; 
    cursor: pointer; 
    width: 100%;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 13px;
}

.buy-btn:hover { 
    background: linear-gradient(45deg, #1f6391, #2980b9); 
    transform: translateY(-1px);
}

.buy-btn:disabled { 
    background: #95a5a6; 
    cursor: not-allowed; 
    transform: none;
}

.edit-btn:hover {
    background: linear-gradient(45deg, #e67e22, #d35400) !important;
    transform: translateY(-1px);
}

.unified-filters {
    margin-top: 15px;
    text-align: center;
    padding: 15px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
}

.filter-btn {
    transition: all 0.3s ease;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    opacity: 0.9;
}

.filter-btn.active {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.quantity-control { 
    margin-bottom: 10px; 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.quantity-control input { 
    width: 45px; 
    text-align: center; 
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.quantity-control button { 
    background: #34495e; 
    color: white; 
    border: none; 
    padding: 5px 9px; 
    cursor: pointer; 
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 13px;
}

.quantity-control button:hover {
    background: #2c3e50;
}

.message { 
    padding: 15px; 
    margin-bottom: 20px; 
    border-radius: 5px; 
    text-align: center;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success { 
    background: rgba(212, 237, 218, 0.95); 
    color: #155724; 
    border: 2px solid #28a745;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    font-size: 14px;
    line-height: 1.8;
}

.success strong {
    color: #0d4419;
    font-weight: bold;
}

.success em {
    display: block;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(21, 87, 36, 0.2);
    font-style: normal;
    color: #0d4419;
    font-weight: 600;
}

.error { 
    background: rgba(248, 215, 218, 0.95); 
    color: #721c24; 
    border: 2px solid #dc3545;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
    font-size: 14px;
    line-height: 1.8;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.error strong {
    color: #491217;
    font-weight: bold;
}

.admin-link {
    background: rgba(231, 76, 60, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    margin-left: 10px;
}

.admin-link:hover {
    background: rgba(192, 57, 43, 1);
}

.no-products {
    text-align: center; 
    padding: 50px;
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    margin-top: 20px;
}

.level-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

.level-badge.low {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
}

.level-badge.mid {
    background: linear-gradient(45deg, #f39c12, #f1c40f);
}

.level-badge.high {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
}

.level-btn:hover, .currency-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
    opacity: 0.9;
}

.level-btn.active, .currency-btn.active {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

.currency-btn img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)) brightness(1.1);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.15);
    padding: 3px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.currency-btn:hover img {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5)) brightness(1.2);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.currency-btn.active img {
    animation: pulse 2s infinite;
}

@media (max-width: 768px) {
    .level-filter, .currency-filter {
        padding: 10px !important;
    }
    .level-filter span, .currency-filter span {
        display: block;
        margin-bottom: 10px;
    }
    .level-btn, .currency-btn {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
    .currency-btn img {
        width: 14px !important;
        height: 14px !important;
    }
}
