/* ============================================================
   Grim Dawn Item Tracker – Fangs of Asterkarn Theme
   Eisiges Nordland: tiefes Nachtblau, Eisweiß, Stahl, Frost
   ============================================================ */

* { box-sizing: border-box; }

html {
    min-height: 100%;
    background: transparent;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background-color: #0b0f18;
    background-image: url('/assets/bg.jpg');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    color: #c8d8e8;
}

/* Dunkles Overlay über dem Hintergrundbild */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 15, 24, 0.80);
    z-index: -1;
    pointer-events: none;
}

/* ---- Topbar ---- */
.topbar {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #0d1520 0%, #111e2e 60%, #0d1520 100%);
    padding: 12px 24px;
    border-bottom: 2px solid #2a5070;
    box-shadow: 0 2px 12px rgba(60,140,200,0.15);
}

.topbar h1 {
    font-size: 20px;
    margin: 0;
    color: #7ec8e8;
    text-shadow: 0 0 10px rgba(100,200,255,0.4);
    letter-spacing: 1px;
}

.topbar a {
    color: #8aafcc;
    text-decoration: none;
    margin-left: 4px;
}
.topbar a:hover { color: #7ec8e8; text-shadow: 0 0 6px rgba(100,200,255,0.5); }

/* ---- Container ---- */
.container {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 24px auto;
    padding: 0 16px;
}

/* ---- Auth Box (Login / Register) ---- */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}
.auth-box {
    max-width: 360px;
    margin: auto;
    text-align: center;
    background: #0e1a28;
    padding: 32px;
    border-radius: 6px;
    border: 1px solid #2a5070;
    box-shadow: 0 0 24px rgba(60,140,200,0.1);
}
.auth-box h1 {
    color: #7ec8e8;
    font-size: 22px;
    text-shadow: 0 0 8px rgba(100,200,255,0.3);
    text-align: center;
}
.auth-box label {
    display: block;
    margin-bottom: 14px;
    font-size: 14px;
    color: #a0bcd0;
    text-align: left;
}
.auth-box input {
    width: 100%;
    padding: 8px;
    margin-top: 4px;
    background-color: #0b0f18;

    border: 1px solid #2a5070;
    color: #c8d8e8;
    border-radius: 4px;
}
.auth-box a { color: #5aaaca; }
.auth-box a:hover { color: #7ec8e8; }

/* ---- Buttons ---- */
button, .btn-small {
    background: #1a3a54;
    color: #c8e8f8;
    border: 1px solid #2a6080;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s, box-shadow 0.15s;
}
button:hover, .btn-small:hover {
    background: #1e4a6a;
    box-shadow: 0 0 8px rgba(80,180,240,0.3);
}
.btn-danger { background: #3a1a1a; border-color: #6a2a2a; }
.btn-danger:hover { background: #5a2020; }

/* ---- Filter-Bar ---- */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.filter-bar input, .filter-bar select {
    padding: 8px;
    background: #0e1a28;
    border: 1px solid #2a5070;
    color: #c8d8e8;
    border-radius: 4px;
    text-transform: capitalize;
}

/* ---- Item-Tabelle ---- */
.item-table {
    width: 100%;
    border-collapse: collapse;
    background: #0c1520;
}
.item-table th, .item-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #162535;
    text-align: left;
    font-size: 14px;
}
.item-table th {
    color: #7ec8e8;
    background: #0e1e30;
    letter-spacing: 0.5px;
}
.item-table tbody tr { background: #0c1520; }
.item-table tr:hover { background: #111e2e; }

/* ---- Raritätsfarben (Grim-Dawn-Standard) ---- */
.rarity-legendary td:first-child { color: #a552e8; font-weight: bold; }
.rarity-epic     td:first-child { color: #6699ee; font-weight: bold; }
.rarity-rare     td:first-child { color: #55cc77; }
.rarity-magic    td:first-child { color: #5599dd; }
.rarity-relic    td:first-child { color: #4ecde8; font-weight: bold; }

/* ---- Inline-Formular (Items markieren) ---- */
.inline-form {
    display: flex;
    gap: 6px;
    align-items: center;
}
.qty-input {
    width: 55px;
    padding: 4px;
    background-color: #0b0f18;

    border: 1px solid #2a5070;
    color: #c8d8e8;
    border-radius: 4px;
}
.inline-form input[type="text"] {
    background-color: #0b0f18;
    border: 1px solid #2a5070;
    color: #c8d8e8;
    border-radius: 4px;
    padding: 4px 6px;
}

/* ---- Fortschritt & Meldungen ---- */
.progress {
    color: #7ec8e8;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(100,200,255,0.3);
}
.success { color: #55cc88; }
.error   { color: #cc5555; }

/* ---- Code/Pre ---- */
pre {
    background: #080d14;
    color: #7eccea;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #1a3550;
    overflow: auto;
    max-height: 300px;
}


/* Dropdown-Menü in der Topbar */
.menu-dropdown {
    position: relative;
    display: inline-block;
}
.menu-trigger {
    cursor: pointer;
}
.menu-items {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #0e1a28;
    border: 1px solid #2a5070;
    border-radius: 4px;
    min-width: 240px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    padding: 4px 0;
    margin-top: 4px;
}
.menu-dropdown.open .menu-items {
    display: block;
}
.menu-items a {
    display: block;
    padding: 8px 14px;
    color: #7ec8e8 !important;
    text-decoration: none;
    white-space: nowrap;
    font-size: 14px;
    border: none !important;
}
.menu-items a:hover {
    background: #1a3040;
    color: #fff !important;
}
