/* ================================
   ITEMS CATEGORY - MODERN DESIGN
   Helmets, Armors, Legs, Boots, etc.
   ================================ */

:root {
    --primary-bg: #0f141a;
    --secondary-bg: #1a2332;
    --border-color: #2a3440;
    --accent-cyan: #00ffaa;
    --text-light: #e6f8ff;
    --text-muted: #a8b3c2;
    --error-red: #ff4444;
    --success-green: #7AF972;
    --warning-yellow: #F9F572;
    --row-hover: rgba(0, 255, 170, 0.1);
    --row-hover-dark: rgba(0, 255, 170, 0.15);
}

/* ================================
   BODY & CONTAINER
   ================================ */

body {
    background-color: var(--primary-bg);
    color: var(--text-light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

#page {
    max-width: 95%;
    margin: 0 auto;
    padding: 20px;
}

/* ================================
   NAVIGATION BREADCRUMB
   ================================ */

.category-breadcrumb {
    text-align: center;
    margin: 20px 0;
    padding: 16px;
}

.category-breadcrumb a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    margin: 0 8px;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.category-breadcrumb a:hover {
    background: rgba(0, 255, 170, 0.1);
    text-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
}

.category-breadcrumb b {
    color: var(--text-muted);
}

/* ================================
   HEADER SECTION
   ================================ */

.items-category-header {
    background: linear-gradient(135deg, #1a2332 0%, #0f141a 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.items-category-header h1 {
    font-size: 36px;
    color: var(--accent-cyan);
    margin: 0 0 10px 0;
    text-shadow: 0 2px 10px rgba(0, 255, 170, 0.2);
}

.items-category-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* ================================
   TABLE CONTAINER
   ================================ */

.items-table-container {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin: 30px 0;
}

.items-table-header {
    background: linear-gradient(135deg, #1a2332 0%, #141c28 100%);
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
}

.items-table-header h2 {
    font-size: 20px;
    color: var(--accent-cyan);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.items-table-header-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 170, 0.4));
}

/* ================================
   MODERN TABLE STYLES
   ================================ */

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--secondary-bg);
}

table thead {
    background: linear-gradient(135deg, #1a2332 0%, #141c28 100%);
}

table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--accent-cyan);
    border-bottom: 2px solid var(--border-color);
    user-select: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table th:first-child {
    padding-left: 20px;
    text-align: center;
    width: 80px;
}

table th[onclick] {
    cursor: pointer;
    transition: all 0.3s ease;
}

table th[onclick]:hover {
    color: var(--text-light);
    text-shadow: 0 0 10px rgba(0, 255, 170, 0.3);
}

table th img {
    margin-left: 6px;
    vertical-align: middle;
    width: 12px;
    height: 12px;
}

table tbody tr {
    background: var(--secondary-bg);
    border-bottom: 1px solid rgba(42, 52, 64, 0.5);
    transition: all 0.3s ease;
}

table tbody tr:hover {
    background: var(--row-hover);
    box-shadow: inset 0 0 0 1px var(--border-color);
}

table td {
    padding: 14px 12px;
    color: var(--text-light);
    font-size: 14px;
}

table td:first-child {
    padding-left: 20px;
    text-align: center;
    width: 80px;
    padding: 10px 12px;
}

/* ================================
   ITEM IMAGE CELL
   ================================ */

table td img {
    max-width: 48px;
    max-height: 48px;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.5));
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    transition: all 0.3s ease;
}

table tr:hover td img {
    filter: drop-shadow(0 0 12px rgba(0, 255, 170, 0.4));
    transform: scale(1.1);
}

/* ================================
   ITEM NAME CELL
   ================================ */

table td:nth-child(2) {
    font-weight: 500;
    color: var(--text-light);
    transition: color 0.3s ease;
    min-width: 200px;
}

table tr:hover td:nth-child(2) {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px rgba(0, 255, 170, 0.3);
}

table td b {
    font-weight: 600;
}

/* ================================
   VALUE CELLS (Armor, Defense, Attack, Weight)
   ================================ */

table td:nth-child(3),
table td:nth-child(4) {
    text-align: center;
    color: var(--accent-cyan);
    font-weight: 500;
    min-width: 120px;
}

table td:nth-child(4) {
    min-width: 100px;
}

table tr:hover td:nth-child(3),
table tr:hover td:nth-child(4) {
    text-shadow: 0 0 10px rgba(0, 255, 170, 0.4);
}

/* ================================
   DESCRIPTION CELL
   ================================ */

table td:last-child {
    color: var(--text-muted);
    font-size: 13px;
    max-width: 400px;
    word-break: break-word;
    padding-right: 20px;
    text-align: left !important;
}

table tr:hover td:last-child {
    color: var(--text-light);
}

/* ================================
   LINK STYLES
   ================================ */

table a {
    color: gold;
    text-decoration: none;
    transition: color 0.3s ease;
}

table a:hover {
    color: #FFD700;
    text-decoration: underline;
}

/* ================================
   EMPTY STATE
   ================================ */

.items-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.items-empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.items-empty-state p {
    font-size: 16px;
    margin: 0;
}

/* ================================
   SEARCH & FILTER
   ================================ */

.items-filter-section {
    background: linear-gradient(135deg, rgba(0, 255, 170, 0.1) 0%, rgba(0, 255, 170, 0.05) 100%);
    border: 1px solid rgba(0, 255, 170, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.items-filter-section input {
    width: 100%;
    padding: 12px 16px;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 14px;
    transition: all 0.3s ease;
}

.items-filter-section input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 255, 170, 0.2);
}

.items-filter-section input::placeholder {
    color: var(--text-muted);
}

/* ================================
   ANIMATIONS
   ================================ */

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.items-table-container {
    animation: slideInUp 0.5s ease-out;
}

table tbody tr {
    animation: fadeInScale 0.3s ease-out;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media screen and (max-width: 1024px) {
    #page {
        padding: 16px;
    }
    
    .items-category-header {
        padding: 20px 16px;
    }
    
    .items-category-header h1 {
        font-size: 28px;
    }
    
    table th:nth-child(5) {
        display: none;
    }
    
    table td:nth-child(5) {
        display: none;
    }
    
    table {
        font-size: 13px;
    }
    
    table th,
    table td {
        padding: 12px 8px;
    }
}

@media screen and (max-width: 768px) {
    .category-breadcrumb {
        padding: 12px;
        margin: 16px 0;
    }
    
    .category-breadcrumb a {
        display: inline-block;
        margin: 4px;
        font-size: 13px;
    }
    
    .items-category-header {
        padding: 20px 12px;
    }
    
    .items-category-header h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .items-category-header p {
        font-size: 13px;
    }
    
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 10px 6px;
    }
    
    table th:first-child,
    table td:first-child {
        width: 60px;
        padding: 8px 4px;
    }
    
    table img {
        max-width: 40px;
        max-height: 40px;
    }
    
    table th:nth-child(4),
    table th:nth-child(5) {
        display: none;
    }
    
    table td:nth-child(4),
    table td:nth-child(5) {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    #page {
        padding: 12px;
    }
    
    .items-table-header {
        padding: 16px;
    }
    
    .items-table-header h2 {
        font-size: 18px;
    }
    
    .category-breadcrumb {
        padding: 8px;
        margin: 12px 0;
    }
    
    .category-breadcrumb a {
        font-size: 12px;
        margin: 2px;
        padding: 2px 4px;
    }
    
    .items-category-header {
        padding: 16px 12px;
        margin: 16px 0;
    }
    
    .items-category-header h1 {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    table {
        font-size: 11px;
    }
    
    table th,
    table td {
        padding: 8px 4px;
    }
    
    table th:first-child,
    table td:first-child {
        width: 50px;
        padding: 6px 2px;
    }
    
    table img {
        max-width: 32px;
        max-height: 32px;
    }
    
    table th:nth-child(3),
    table th:nth-child(4),
    table th:nth-child(5) {
        display: none;
    }
    
    table td:nth-child(3),
    table td:nth-child(4),
    table td:nth-child(5) {
        display: none;
    }
    
    table td:last-child {
        display: none;
    }
}

/* ================================
   DARK MODE COMPATIBILITY
   ================================ */

@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--primary-bg);
        color: var(--text-light);
    }
}

/* ================================
   SCROLLBAR STYLING
   ================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 170, 0.3);
}
