:root {
    --unique-color: #C99542;
    --set-color: #00A000;
    --rare-color: #E2C75C;
    --magic-color: #3D69DC;
    --normal-color: #eee;
    --diablo-red: #d9534f;
    --background-dark: #111;
    --background-darker: #0a0a0a;
}

body {
    font-family: 'Exocet', sans-serif; /* Example Diablo-like font */
    background-color: #111;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    color: #eee;
    display: flex; /* Use flexbox for layout */
    margin: 0;
    padding: 0;
    min-height: 100vh; /* Ensure body takes at least full viewport height */
}

/* Create a container for the background */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Ensure it appears behind other elements */
    overflow: hidden;
}

/* Style the background image */
.background-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: 80%; /* Adjust this value to control the size of the image */
    opacity: 0.8; /* Adjust this value to control the transparency */
}


#user-section {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #fff;
    font-size: 14px;
}

#logout-btn {
    margin-left: 15px;
    padding: 5px 10px;
    background-color: #d9534f;
    color: white;
    text-decoration: none;
    border-radius: 3px;
}

#logout-btn:hover {
    background-color: #c9302c;
}

#user-display {
    color: #eee;
}

#sidebar {
    width: 350px;
    min-width: 350px; /* Add minimum width */
    background-color: #181818;
    padding: 20px;
    overflow-y: auto; /* Allow scrolling if content overflows */
    position: relative; /* Allow for absolute positioning inside */
}

#main-content {
    flex-grow: 1; /* Allow main content to take remaining space */
    padding: 20px;
    overflow-x: auto; /* Add this to enable horizontal scrolling for the main content */
}

h1, h3, h4 {
    text-align: center;
    color: #d9534f; /* Diablo red */
}

h3 {
    margin-top: 0;
}

#controls, #filter-options {
    margin-bottom: 20px;
}

/* Logo Styles */
#logo {
    position: absolute;
    right: 0;
    width: 300px;
    height: auto;
}

#logo img {
    width: 100%;
    height: auto;
}

/* Filter Styles */
#filters label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#filters select, #filters input[type="text"] {
    width: 95%;
    background-color: #222;
    color: #eee;
    border: 1px solid #555;
    padding: 5px;
    margin-bottom: 10px;
}

#filters #clear-filters {
    width: 100%;
    background-color: #d9534f; /* Diablo Red */
    color: white;
    border: none;
    padding: 8px 15px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

/* Table Styles */
table {
    width: 100%; /* Allow table to take full width of its container */
    margin: 20px auto;
    border-collapse: collapse;
    table-layout: fixed; /* Ensures equal column widths */
}

th {
    background: linear-gradient(to bottom, #2a2a2a, #1a1a1a);
    border: 1px solid #444;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

td {
    border: 1px solid #333;
    transition: background-color 0.2s;
}

tr:hover td {
    background-color: rgba(217, 83, 79, 0.1);
}
/* Zebra striping for better readability */
tbody tr:nth-child(even) {
    background-color: #181818;
}

/* Summary Section Styles */
#summary-section {
    margin-bottom: 20px;
}

/* Active Filters Styling */
#active-filters {
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
}

#active-filters h4 {
    margin-bottom: 5px;
}

#filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#filter-list li {
    background-color: #333;
    padding: 5px 10px;
    margin-bottom: 5px;
    border-radius: 3px;
}

/* Item Type Colors */
.item-type-unique { color: #C99542; }
.item-type-set { color: #00A000; }
.item-type-rare { color: #E2C75C; }
.item-type-magic { color: #3D69DC; }
.item-type-normal { color: #eee; }

/* Tooltip Styling */
.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted black;
}

.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 300px;
    background-color: black;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    top: 150%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s;
}

#drop-table td {
    cursor: pointer;
}

#item-details-display {
    margin-top: 20px;
    border: 1px solid #555;
    padding: 10px;
    background-color: #181818;
    border-radius: 5px;
    display: none;
}

#item-details-display h2 {
    margin-top: 0;
    color: #d9534f; /* Diablo red */
}
/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1; /* Sit on top, higher than tooltip */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if content is too tall */
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

.modal-content {
    background: linear-gradient(to bottom, #222, #1a1a1a);
    border: 2px solid #444;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}


.modal-content h2 {
    color: #d9534f; /* Match your heading styles */
    text-align: center;
    margin-top: 0; /* Adjust margin as needed */
}

.modal-content img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px; /* Space below the image */
    max-width: 150px; /* Adjust max-width as needed */
    height: auto;
}

.modal-content p {
    text-align: center; /* Center text */
}

.modal-content ul {
    list-style-type: none; /* Remove bullet points from list */
    padding: 0; /* Remove default padding */
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer; /* Make it look clickable */
}

.close-modal:hover,
.close-modal:focus {
    color: #d9534f; /* Change color on hover for emphasis */
    text-decoration: none;
    cursor: pointer;
}
#item-image {
    float: left;
    margin-right: 10px;
    margin-bottom: 10px;
}
.item-details {
    display: none; /* Hide details by default */
    font-size: smaller; /* Slightly reduce font size for details */
}

.multiple-select {
    background-color: #222; /* Example: Dark background */
    color: #eee;            /* Example: Light text */
}
.ms-choice {
    background-color: #333; /* Darker shade for the choice dropdown */
    border: 1px solid #666;   /* Slightly lighter border for contrast */
}
.ms-drop {
    background-color: #222; /* Dropdown menu background */
    color: #eee;            /* Dropdown menu text color */
}
.ms-search input {
    color: #eee;
    background-color: #111; /* Set the background color of the search input */
    border-bottom: 1px solid #666 !important;
}

.item-name {
    position: relative; /* Make the item name a positioning context for the tooltip */
}

.item-details-tooltip {
    visibility: hidden; /* Hide by default */
    position: absolute;
    top: 100%; /* Position below the item name */
    left: 0;
    width: 300px; /* Adjust width as needed */
    background-color: black;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    z-index: 1; /* Ensure tooltip is above other elements */
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s; /* Add transition for smooth appearance */
}
/* Navigation Styles */
#top-nav {
    background: linear-gradient(to bottom, #2a2a2a, #1a1a1a);
    border-bottom: 2px solid #d9534f;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    color: #eee;
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.nav-item:hover {
    background-color: rgba(217, 83, 79, 0.2);
}

.nav-item.active {
    background-color: #d9534f;
    color: white;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-button {
    background-color: transparent;
    border: 1px solid #d9534f;
    color: #d9534f;
    padding: 5px 15px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-button:hover {
    background-color: #d9534f;
    color: white;
}

/* Page Content Styles */
#page-container {
    margin-top: 60px; /* Height of nav bar */
    padding: 20px;
}

.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

/* Stats Page Styles */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.stats-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 20px;
}

/* Settings Page Styles */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-section {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.setting-item {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Statistics Page Styling */
.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.stat-label {
    color: #999;
}

.stat-value {
    font-weight: bold;
    color: #eee;
}

.top-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    border-bottom: 1px solid #333;
}

.top-item:last-child {
    border-bottom: none;
}

.item-count {
    background: rgba(217, 83, 79, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.9em;
}

.no-items {
    text-align: center;
    color: #666;
    padding: 10px;
}

.top-item .item-count {
    background: rgba(217, 83, 79, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.9em;
}

/* Chart container */
canvas#rarity-chart {
    max-height: 300px;
    margin: 20px auto;
}

/* Show tooltip on hover */
.item-name:hover .item-details-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Add item glow effects */
.item-unique:hover {
    box-shadow: 0 0 10px var(--unique-color);
}

.item-set:hover {
    box-shadow: 0 0 10px var(--set-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        flex-direction: column; /* Stack sidebar and content vertically */
    }

    #sidebar {
        width: 100%;
        min-width: auto;
        overflow-y: initial; /* Remove scrolling for sidebar */
    }

    #main-content {
        padding: 10px; /* Adjust padding for smaller screens */
    }
}

button {
    background: linear-gradient(to bottom, var(--diablo-red), #c9302c);
    border: 1px solid #ac2925;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}

button:hover {
    background: linear-gradient(to bottom, #c9302c, #ac2925);
    transform: translateY(1px);
}

.quality-indicator {
    width: 4px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.quality-unique .quality-indicator {
    background-color: var(--unique-color);
}

/* Add scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

/* In style.css */
#pagination {
    margin-top: 10px;
    text-align: center;
}

#pagination button {
    background-color: #333;
    color: #eee;
    border: none;
    padding: 5px 10px;
    margin: 0 3px;
    border-radius: 3px;
    cursor: pointer;
}

#pagination button:disabled {
    background-color: #666;
    cursor: default;
}

/* Style for the current page button */
#pagination .current-page {
    background-color: #d9534f; /* Diablo Red */
    color: white;
}