/* TABLE CONTAINER */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}

/* MAIN TABLE */
table {
    width: 100%;
    border-collapse: collapse;
    background: #0f172a; /* dark modern background */
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* HEADER */
thead {
    background: linear-gradient(135deg, #2563eb, #1e293b);
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    color: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

th a {
    color: inherit;
    text-decoration: none;
}

th a:hover {
    color: #60a5fa;
}

/* BODY */
td {
    padding: 14px 16px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.95rem;
}

/* ROW STYLING */
tbody tr {
    transition: all 0.25s ease;
}

tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.02);
}

tbody tr:hover {
    background: rgba(37, 99, 235, 0.15);
    transform: scale(1.01);
}

/* RARITY COLORS */
.Common { color: #9ca3af; }
.Uncommon { color: #22c55e; }
.Rare { color: #3b82f6; }
.Epic { color: #a855f7; }
.Legendary { color: #f59e0b; }

/* AMMO TYPE TAG */
td[class^="ammo-"] {
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-block;
}

/* STAT BARS */
.stat-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    transform-origin: left;
    transition: transform 0.5s ease;
}

/* ACTION BUTTON */
td a {
    display: inline-block;
    padding: 6px 12px;
    background: #2563eb;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

td a:hover {
    background: #1e40af;
    transform: translateY(-2px);
}

/* SEARCH FORM */
form {
    margin: 20px 0;
}

input[type="text"], select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    outline: none;
    margin-right: 10px;
}

input[type="submit"] {
    padding: 8px 16px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

input[type="submit"]:hover {
    background: #1e40af;
}

/* SUCCESS / ERROR */
.success {
    background: #16a34a;
    color: white;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

.error {
    background: #dc2626;
    color: white;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    table {
        font-size: 0.8rem;
    }

    th, td {
        padding: 10px;
    }
}