* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #0f0f1a;
    color: white;
    transition: background 0.3s;
}

a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.container {
    display: flex;
    min-height: 100vh;
    padding-top: 63px;
}

/* Header */
.multi-header {
    background: rgba(10, 1, 22, 0.85);
    height: 63px;
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.multi-header .logo {
    font-size: 1.8rem;
    background: linear-gradient(90deg, #9147ff, #6b9aff);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Sidebar */
.sidebar {
    padding: 15px;
    position: fixed;
    top: 63px;
    right: -500px;
    width: 500px;
    height: calc(100vh - 63px);
    background: #1a1a2a;
    transition: right 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close {
    display: flex;
    justify-content: end;
    color: #aaa;
    font-size: 28px;
    cursor: pointer;
}

.close:hover {
    color: white;
}

.light-mode .close {
    color: #666;
}

.light-mode .close:hover {
    color: #333;
}

.sidebar-box {
    padding: 0 15px 15px 15px;
    border-bottom: 1px solid #33334d;
}

.light-mode .sidebar-box {
    border-bottom: 1px solid #979797;
}

.sidebar-header h3 {
    font-size: 1.1rem;
}

.sidebar-header .close-sidebar {
    cursor: pointer;
    font-size: 1.2rem;
}

.search-box {
    width: 100%;
    padding: 10px;
    background: #252542;
    border: none;
    border-radius: 25px;
    color: white;
    margin-top: 10px;
}

/* Streamer Grid */
.streamer-grid {
    overflow-y: auto;
    display: flex;
    flex-direction: column;

}

.group-grid {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.streamer-card {
    border: 2px solid #9147ff;
    background: #2a1a4a;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.streamer-card:hover {
    transform: translateY(-3px);
}

.streamer-card.selected {
    background: #9147ff;
}

.streamer-image {
    width: 100%;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 10px;
}

.streamer-name {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Footer com numeração e botão Assistir */
.sidebar-footer {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid #33334d;
}

.light-mode .sidebar-footer {
    border-top: 1px solid #979797;
}

.sidebar-footer span {
    font-size: 0.9rem;
}

.assistir-btn {
    background: linear-gradient(90deg, #9147ff, #6b9aff);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.assistir-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(145, 71, 255, 0.4);
}

/* Área Principal */
.main-content {
    flex: 1;
    padding: 20px;
    display: flex;
    height: calc(100vh - 63px);
    overflow-y: auto;
}

.streams-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    width: 100%;
    height: max-content;
    max-height: calc(100vh - 105px);
    padding: 0 15px 0 15px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.streams-container::-webkit-scrollbar {
    display: none;
}

.chat-container {
    width: 460px;
    background: #1a1a2a;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

body.light-mode .sidebar {
    background: #ffffff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

body.light-mode .search-box {
    background: #f0f0f0;
    color: #333;
}

body.light-mode .streamer-card {
    background: #f0e6ff;
    border-color: #4B0082;
}

body.light-mode .streamer-card.selected {
    background: #4B0082;
    color: white;
}

body.light-mode .chat-container {
    background: #ffffff;
}

body.light-mode .chat-header {
    background: #f0f0f0;
    border-bottom: 1px solid #ccc;
}

.chat-container.hidden {
    width: 0;
    padding: 0;
    overflow: hidden;
}

.stream-wrapper {
    position: relative;
    width: auto;
    aspect-ratio: 16/9;
    max-height: calc(100vh - 105px);
    background: #1a1a2a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.stream-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.chat-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
    transition: filter 0.3s ease;
}

.light-mode .chat-iframe {
    filter: brightness(1.1);
}

/* Botões */
.toggle-btn {
    background: linear-gradient(90deg, #9147ff, #6b9aff);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(145, 71, 255, 0.4);
}

/* Chat Container Header */
.chat-header {
    padding: 10px;
    background: #252542;
    border-radius: 10px;
    border-bottom: 1px solid #33334d;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header label {
    font-size: 0.9rem;
}

.chat-header select {
    flex: 1;
    padding: 5px;
    background: #252542;
    color: white;
    border: none;
    border-radius: 5px;
}

.light-mode .chat-header select {
    background: #ffffff;
    color: #333;
}

.chat-body {
    flex: 1;
}

.streamer-group-title {
    grid-column: 1 / -1;
    color: #9147ff;
    font-size: 1.2rem;
    padding: 15px 0 5px;
    border-bottom: 2px solid #9147ff;
    margin-bottom: 10px;
}

.streamer-group-title.umbra {
    color: #6b9aff;
    border-color: #6b9aff;
}

.streamer-card.umbra {
    background: #252542;
    border: none;
}

.streamer-card.umbra.selected {
    background: #6b9aff;
}

/* Light Mode */
body.light-mode .streamer-group-title {
    color: #4B0082;
    border-color: #4B0082;
}

body.light-mode .streamer-group-title.umbra {
    color: #333;
    border-color: #333;
}

body.light-mode .streamer-card.umbra {
    background: #e0e0e0;
    color: #333;
}

body.light-mode .streamer-card.umbra.selected {
    background: #9147ff;
    color: #fff;
}

/* Light Mode */
body.light-mode {
    background: #f0f0f0;
    color: #333;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        right: -100%;
    }

    .chat-container {
        position: fixed;
        right: 20px;
        bottom: 20px;
        width: 300px;
        height: 400px;
        z-index: 1000;
    }

    .streams-container {
        grid-template-columns: 1fr;
    }
}