:root {
    --bg:     #0b0d10;
    --panel:  #151922;
    --text:   #e8ecf1;
    --muted:  #9aa4b2;
    --accent: #5eb1ff;
}

* {
    box-sizing: border-box;
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox, Safari 18.2+, Chromium 121+ */
}
*::-webkit-scrollbar {
    display: none;  /* Older Safari and Chromium */
}

body {
    margin:         0;
    font-family:    system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background:     var(--bg);
    color:          var(--text);
    display:        flex;
    flex-direction: column;
    max-height:     100vh;
    overflow-y:     hidden;
}

.topbar {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    padding:         12px 16px;
    background:      #0f131a;
    border-bottom:   1px solid #1f2530;
}

.topbar a {
    color:           var(--accent);
    text-decoration: none;
    margin:          0 10px
}

.topbar a:hover {
    text-decoration: underline;
    font-weight:     bold;
}

.layout {
    display: flex;
    gap:     16px;
    padding: 16px;
    flex: 1;
    overflow-y: hidden;
}

.column {
    background:    var(--panel);
    border:        1px solid #1f2530;
    border-radius: 8px;
    padding:       12px;
    overflow-y:    scroll;
}

.left {
    flex:      1;
}

.right {
    min-width: 25%;
}

.panel {
    margin:        8px 16px 0 16px;
    padding:       12px;
    background:    var(--panel);
    border:        1px solid #1f2530;
    border-radius: 8px;
}

.intro p {
    margin: 6px 0;
}

.intro-split {
    display: flex;
    gap:     16px;
}

.intro-left {
    flex: 1;
}

.intro-right {
    width:           540px;
    display:         flex;
    gap:             10px;
    flex-wrap:       wrap;
    justify-content: flex-end;
}

.thumb {
    display:       inline-block;
    width:         100px;
    height:        100px;
    border:        1px solid #1f2530;
    border-radius: 6px;
    overflow:      hidden;
}

.thumb img {
    width:      100%;
    height:     100%;
    object-fit: cover;
    display:    block;
}

.categories-table {
    width:           100%;
    border-collapse: collapse;
}

.categories-table th, .categories-table td {
    text-align:    left;
    padding:       8px 10px;
    border-bottom: 1px solid #212734;
}

.categories-table thead th:first-child {
    width: 150px;
}

.categories-table tbody tr {
    cursor: default;
}

.categories-table tbody tr.drop-target {
    outline:    2px dashed var(--accent);
    background: #101520;
}

.vtuber-drop {
    display:               grid;
    grid-template-columns: repeat(auto-fill, 150px);
    gap:                   10px;
    align-items:           flex-start;
}

/* New flex-based category rows */
.rows {
    display:        flex;
    flex-direction: column;
}

/* Use grid for each category row so height grows with wrapped tiles */
.rows > .dropzone {
    min-height:            fit-content;
    display:               grid;
    grid-template-columns: 200px 1fr;
    column-gap:            8px;
    align-items:           start;
    border:                1px solid gray;
    border-bottom:         0;
    padding:               0;
}

.dropzone:last-child {
    border-bottom: 1px solid gray;
}

.category {
    width: 200px;
    flex: 0 0 200px;
    font-weight: 600;
    display: flex;            /* statt inline-flex */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 10px;
    color: #000;
    margin-right: 8px;
    align-self: stretch;
    min-height: 175px;
    white-space: normal;   /* erlaubt Umbruch */
    word-break: break-word; /* falls lange Namen */
}

.dropzone.drop-target {
    outline:    2px dashed var(--accent);
    background: #101520;
}

/* Tile container occupies the second grid column and wraps as needed */
.rows .vtuber-drop {
    display:       flex;
    flex-wrap:     wrap;
    gap:           10px;
    align-content: flex-start;
}

.suggest-form {
    padding:       10px;
    background:    #111622;
    border:        1px solid #1e2431;
    border-radius: 6px;
}

.suggest-form form {
    display:     flex;
    gap:         8px;
    flex-wrap:   wrap;
    align-items: center;
}

.suggest-form input {
    background:    #0f131a;
    color:         var(--text);
    border:        1px solid #1f2530;
    padding:       8px;
    border-radius: 4px;
}

.suggest-form button {
    padding:       8px 12px;
    border-radius: 4px;
    border:        1px solid #1f2530;
    background:    #162033;
    color:         var(--text);
    cursor:        pointer;
}

.suggest-form .msg {
    margin-left: 8px;
    color:       var(--muted);
}

.cards {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap:                   10px;
}

.card {
    background:     #101520;
    border:         1px solid #1f2530;
    border-radius:  8px;
    padding:        10px;
    display:        flex;
    flex-direction: column;
    gap:            8px;
}

.card .title {
    font-weight: 600;
}

.card .meta {
    color:     var(--muted);
    font-size: 12px;
}

.badge {
    display:       inline-block;
    padding:       2px 6px;
    border-radius: 6px;
    font-size:     12px;
    border:        1px solid #2a3242;
    color:         var(--muted);
    background:    #0f131a;
}

.badge.pill {
    border-radius: 999px;
}

.draggable {
    cursor: grab;
}

/* VTuber tiles */
.tiles {
    display:               grid;
    grid-template-columns: repeat(auto-fill, 150px);
    gap:                   10px;
}

.vtuber-tile {
    width:               150px;
    height:              175px;
    background-position: top left;
    background-repeat:   no-repeat;
    background-size:     150px;
    position:            relative;
    border:              1px solid #1f2530;
    border-radius:       8px;
    overflow:            hidden;
}

.vtuber-tile .caption {
    position:        absolute;
    left:            0;
    right:           0;
    bottom:          0;
    height:          25px;
    background:      #ffffff;
    color:           #000000;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-weight:     600;
    font-size:       12px;
    text-decoration: none;
}

.vtuber-tile .caption:hover {
    text-decoration: none;
}

.content {
    padding: 16px;
}

.user-box {
    display:       flex;
    gap:           8px;
    align-items:   center;
    margin-bottom: 12px;
}

.user-box input {
    background:    #0f131a;
    color:         var(--text);
    border:        1px solid #1f2530;
    padding:       8px;
    border-radius: 4px;
}

.user-box button {
    padding:       8px 12px;
    border-radius: 4px;
    border:        1px solid #1f2530;
    background:    #162033;
    color:         var(--text);
    cursor:        pointer;
}

.msg {
    color: var(--muted);
}

.toast {
    position:      fixed;
    bottom:        16px;
    right:         16px;
    background:    #0f131a;
    border:        1px solid #1f2530;
    padding:       8px 12px;
    border-radius: 6px;
    opacity:       0;
    transform:     translateY(8px);
    transition:    all .25s ease;
}

.toast.show {
    opacity:   1;
    transform: translateY(0);
}

.toast.err {
    border-color: #aa3333;
    color:        #ff8888;
}

.muted {
    color: var(--muted);
}

.intro {
    padding: 16px;
}

/* Cookie banner */
#cookieBanner {
    position:      fixed;
    left:          16px;
    right:         16px;
    bottom:        16px;
    background:    #0f131a;
    border:        1px solid #1f2530;
    color:         var(--text);
    border-radius: 8px;
    padding:       12px;
    display:       none;
    z-index:       1000;
}

#cookieBanner .title {
    font-weight:   600;
    margin-bottom: 6px;
}

#cookieBanner .row {
    display:     flex;
    gap:         12px;
    align-items: center;
    flex-wrap:   wrap;
}

#cookieBanner button {
    padding:       8px 12px;
    border-radius: 4px;
    border:        1px solid #1f2530;
    background:    #162033;
    color:         var(--text);
    cursor:        pointer;
}

#twitch_login.disabled {
    opacity:        0.6;
    pointer-events: none;
}

#twitch_login {
    text-decoration: none;
    padding:         8px 13px;
    font-size:       14px;
    font-weight:     500;
    display:         inline-block;
    position:        relative;
    text-shadow:     none;
    background:      #9146ff;
    border-radius:   6px;
    color:           #ffffff;
    margin-right:    5px;
    transition:      all 0.3s ease;
}

/* Independent scroll areas without visible scrollbars */
#categoriesBody,
#pendingList {
    overflow:           auto;
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width:    none; /* Firefox */
}

#categoriesBody::-webkit-scrollbar,
#pendingList::-webkit-scrollbar {
    display: none;
}

/* In showList mode, let the whole page scroll */
body.showList .column {
    overflow:   visible;
    min-height: auto;
}

body.showList #categoriesBody {
    max-height: none;
    overflow:   visible;
}

.panel.gate {
    font-weight: bold;
}

a#currentList {
    color:           white;
    text-decoration: none;
    font-size:       large;
    padding-bottom:  16px;
    display:         inline-flex;
    align-items:     end;
}

#downloadPngBtn {
    color:           white;
    background:      none;
    border:          none;
    font:            inherit;
    font-size:       large;
    text-decoration: none;
    padding-bottom:  16px;
    display:         inline-flex;
    align-items:     end;
    cursor:          pointer;
}

#shareLink {
    color:           white;
    text-decoration: none;
    font-size:       small;
    padding-bottom:  8px;
    display:         inline-flex;
    align-items:     end;
}


#toggleFullscreen {
    height: 48px;
    padding: 0;
    margin: 0;
    width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background:    var(--panel);
    border: 0;
    cursor: pointer;
}
#toggleFullscreen img
{
    filter: invert(1);
}