/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* BODY */
body {
    background-color: #202020;
    background-image: url('images/bg.png');
    background-repeat: repeat;
    background-size: auto;
    display: flex;
    justify-content: center;
    padding: 10px;
    font-family: 'Consolas', 'Courier New', monospace;
}

/* KARTKA */
.paper {
    width: 1536px;
    background-color: #242424;
    /* delikatne tło */
    padding: 20px;
    border: 1px solid #95ff00;
    /* match border with other elements */
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* gap between topbar, menubar, and main-area */
}

/* TOPBAR */
.topbar {
    position: relative;
    overflow: hidden;
    background: #242424;
    height: 60px;
    border: 1px solid #95ff00;
    margin-bottom: 6px;
    width: 100%;
    min-width: 0;
}

.topbar-logo-mask {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 220px;
    /* adjust as needed */
    height: 120px;
    /* adjust as needed */
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}

.topbar-big-logo {
    width: 220px;
    /* really big logo */
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px #242424);
    pointer-events: none;
    user-select: none;
}

.topbar-scroll {
    position: absolute;
    left: 0;
    width: 100%;
    height: 120px;
    /* 2x logo-row height for seamless scroll */
    pointer-events: none;
    z-index: 1;
    animation: scroll-up 6s linear infinite;
}

.topbar-scroll-logo {
    position: absolute;
    left: 50%;
    width: 100%;
    height: 180px;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.5vw; /* much smaller gap, brings logos closer to the center */
    pointer-events: none;
    z-index: 1;
    animation: logo-bounce-down-up 3.5s linear infinite;
    animation-delay: 1s;
}

.scrolling-big-logo {
    width: 40vw;
    max-width: 45%;
    height: 180px;
    object-fit: contain;
    opacity: 0.9;
    filter: drop-shadow(0 0 12px #242424);
    pointer-events: none;
    user-select: none;
    display: block;
}

.logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 60px;
    gap: 32px;
}

@keyframes scroll-up {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-60px);
    }
}

@keyframes logo-bounce-down-up {
    0%   { top: 0; }
    8%   { top: 0; }
    18%  { top: 54px; }   /* quick fall (30% of 180px) */
    28%  { top: 54px; }
    29%  { top: 0; }
    100% { top: 0; }
}

#logo-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    /* so it doesn't block clicks */
    z-index: -1;
    /* behind everything */
}

.logo-placeholder {
    position: absolute;
}

/* MENU */
.menubar {
    background-color: transparent;
    border: 1px solid rgb(149, 255, 0);
    color: rgb(149, 255, 0);
    display: flex;
    justify-content: space-around;
    padding: 10px;
    margin-bottom: 6px;
    /* gap below menubar */
    /* border: 0px solid #000;  <-- remove or comment out this line */
}

.menubar button {
    width: 150px;
    height: 60px;
    font-size: 20px;
    cursor: pointer;
    background: #242424;
    /* gray background */
    color: #95ff00;
    /* green letters */
    border: 1px solid #95ff00;
    position: relative;
    transition: background 0.2s, color 0.2s;
    overflow: hidden;
    padding: 0;
}

.menubar button:hover {
    background: #95ff00;
    /* green background */
    color: #242424;
    /* gray letters */
}

/* GŁÓWNY OBSZAR */
.main-area {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: stretch;
    /* Ensure children have equal height */
}

/* CONTENT (żółty) */
.content {
    background-color: #2d2d2d;
    width: 1150px;
    /* Remove fixed height and use flex to fill sidebar height */
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    border: 1px solid #95ff00;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.content h2 {
    color: rgb(149, 255, 0);
    border-bottom: 1px solid rgb(149, 255, 0);
    padding-bottom: 4px;
    margin-bottom: 16px;
    font-size: 2em;
    letter-spacing: 1px;
}

.content p {
    color: #e0e0e0;
    font-size: 1.1em;
    margin-bottom: 12px;
}

.content a {
    color: rgb(149, 255, 0);
    text-decoration: underline;
}

.content ul,
.content ol {
    margin-left: 24px;
    color: #e0e0e0;
}

/* SIDEBAR (szary) */
.sidebar {
    background-color: #cccccc00;
    width: 356px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* gap between elements inside sidebar */
    padding: 10px;
    border: 1px solid rgb(149, 255, 0);
    /* Add border like other elements */
}

/* PLAYER BOX */
.player-box {
    background-color: rgb(149, 255, 0);
    height: 300px;
    color: rgb(149, 255, 0);
    display: flex;
    align-items: stretch;
    /* changed from center */
    justify-content: center;
    font-weight: bold;
    border: 1px solid rgb(149, 255, 0);
    padding: 0;
}

/* CHATBOX */
.chat-box {
    background-color: #2d2d2d;
    /* match .content background */
    border: 1px solid rgb(149, 255, 0);
    /* match other borders */
    padding: 8px;
    border-radius: 0;
    /* remove rounded corners */
    margin-top: 8px;
    min-height: 250px;
    box-sizing: border-box;
    color: rgb(149, 255, 0);
    /* match text color */
}

/* PLACEHOLDERY */
.custom-player {
    background: #212121;
    border: 1px solid #212121;
    padding: 10px;
    font-size: 14px;
    height: 100%;
    width: 100%;
    /* fill horizontally */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

#track-name {
    font-weight: bold;
    margin-bottom: 10px;
    margin-top: 2px;
    text-align: center;
    min-height: 2.5em;
    /* increased for two lines */
    width: 100%;
    display: flex;
    flex-direction: column;
    /* stack prefix above title */
    justify-content: center;
    align-items: center;
    gap: 2px;
    overflow: hidden;
}

.track-title {
    display: inline-block;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.track-title.scrolling {
    animation: scroll-title 8s linear infinite;
}

@keyframes scroll-title {
    0% {
        transform: translateX(0);
    }

    10% {
        transform: translateX(0);
    }

    90% {
        transform: translateX(calc(-100% + 150px));
    }

    100% {
        transform: translateX(calc(-100% + 150px));
    }
}

.controls {
    margin: 2px 0;
    /* Reduced vertical margin */
    display: flex;
    justify-content: center;
    gap: 8px;
    /* optional: adds space between buttons */
}

.controls button {
    font-size: 18px;
    padding: 4px 12px;
    cursor: pointer;
    background: transparent;
    color: rgb(149, 255, 0);
    border: 1px solid rgb(149, 255, 0);
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
    margin-right: 0;
}

.controls button:hover {
    background: rgb(149, 255, 0);
    color: #212121;
}

#playlist {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    overflow-y: auto;
    height: 140px;
    /* About 4 tracks at ~35px each */
    border: 1px solid rgb(149, 255, 0);
    border-radius: 0;
    background: transparent;
}

#playlist li {
    cursor: pointer;
    padding: 4px;
    border-bottom: 1px solid #ccc;
    background: #212121;
    /* gray background */
    color: rgb(149, 255, 0);
    /* green text */
    transition: background 0.2s, color 0.2s;
}

#playlist li:hover {
    background-color: rgb(149, 255, 0);
    /* green background */
    color: #212121;
    /* dark text */
}

.player-title {
    text-align: center;
    width: 100%;
    font-weight: bold;
    font-size: 1.4em;
    color: #212121;
    /* dark gray text */
    margin-bottom: 0;
    letter-spacing: 1px;
    border: 1px solid #212121;
    /* dark gray border */
    border-radius: 0;
    padding: 6px 0;
    background: rgb(149, 255, 0);
    /* light green background */
}

.player-bars {
    display: flex;
    flex-direction: column;
    gap: 18px;
    /* Increased gap between progress and volume bar */
    margin: 8px 0;
}

.volume-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

#progress-bar,
#volume-bar {
    width: 100%;
    accent-color: rgb(149, 255, 0);
    background: #212121;
    border: none;
    height: 6px;
    border-radius: 0;
}

/* FOOTER */
.footer {
    width: 100%;
    text-align: right;
    color: #95ff00;
    background: transparent;
    font-size: 1.1em;
    margin-top: 0;
    padding: 0 12px 0 0;
    /* pad right */
    letter-spacing: 2px;
    font-family: 'Consolas', 'Courier New', monospace;
}

.gray-logo {
    background: #cccccc00 !important;
    /* transparent gray */
    border-radius: 0;
}

.gray-logo img {
    filter: grayscale(1) brightness(0.7);
    opacity: 0.85;
    /* If you reference a gray logo image, also use images/gray-logo.png */
}