:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --primary-color: #bb86fc;
    --secondary-color: #03dac6;
    --error-color: #cf6679;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: var(--card-bg);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 1rem;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.container {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

h1, h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input {
    padding: 0.8rem;
    border-radius: 4px;
    border: 1px solid #333;
    background-color: #2c2c2c;
    color: var(--text-color);
    font-size: 1rem;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

button {
    padding: 0.8rem;
    border-radius: 4px;
    border: none;
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #a370db;
}

.error {
    color: var(--error-color);
    margin-bottom: 1rem;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--primary-color);
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: var(--card-bg);
    margin-top: auto;
}

.upload-section {
    margin-top: 2rem;
    border-top: 1px solid #333;
    padding-top: 1rem;
}

/* --- SHOUTBOX CHAT STYLES --- */
.chat-container {
    background-color: #1a1a1a; /* Bardzo ciemny, prawie czarny */
    padding: 0;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    height: 600px; /* Stała wysokość */
    border: 1px solid #333;
}

.chat-container h2 {
    background-color: #252525;
    color: #e0e0e0;
    margin: 0;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: bold;
    border-bottom: 1px solid #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background-color: #121212;
    display: flex;
    flex-direction: column;
}

/* Scrollbar styling for chat */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}
.chat-messages::-webkit-scrollbar-track {
    background: #121212;
}
.chat-messages::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.chat-row {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid #1e1e1e;
    transition: background-color 0.1s;
}

.chat-row:hover {
    background-color: #1e1e1e;
}

.chat-avatar-small {
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.chat-avatar-small img {
    width: 24px;
    height: 24px;
    border-radius: 50%; /* Opcjonalnie 4px dla kwadratu */
    object-fit: cover;
}

.chat-content-inline {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.chat-username-user {
    color: #03dac6; /* Turkusowy */
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
}

.chat-username-admin {
    color: #ff5555; /* Czerwony */
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
    text-shadow: 0 0 5px rgba(255, 85, 85, 0.3);
}

.chat-text {
    color: #ccc;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time-small {
    font-size: 0.75rem;
    color: #666;
    margin-left: 10px;
    white-space: nowrap;
}

.chat-input-area {
    padding: 10px;
    background-color: #1a1a1a;
    border-top: 1px solid #333;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-area textarea {
    flex: 1;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #333;
    background-color: #0f0f0f;
    color: #e0e0e0;
    resize: none;
    height: 40px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.2;
}

.chat-input-area textarea:focus {
    outline: none;
    border-color: #555;
}

.chat-controls {
    display: flex;
    gap: 5px;
    height: 40px;
}

.chat-btn {
    border: 1px solid #444;
    background-color: #2a2a2a;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    font-weight: bold;
}

.chat-btn:hover {
    background-color: #3a3a3a;
}

.chat-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.emote-btn {
    padding: 0 10px;
    font-size: 1.2rem;
}

.send-btn {
    background-color: var(--primary-color);
    color: #000;
    border: none;
}

.send-btn:hover {
    background-color: #a370db;
}

.emote-picker-container {
    position: relative;
}

.emote-picker {
    position: absolute;
    bottom: 110%;
    right: 0;
    background: #252525;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px;
    width: 250px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.5);
    z-index: 100;
}

.emote-picker img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    cursor: pointer;
    border-radius: 4px;
    padding: 2px;
}

.emote-picker img:hover {
    background: #444;
}

.chat-emote {
    max-height: 24px;
    vertical-align: middle;
}

.mentioned-row {
    background-color: rgba(187, 134, 252, 0.15) !important;
    border-left: 3px solid var(--primary-color) !important;
}

.mention {
    color: var(--primary-color);
    font-weight: bold;
    background: rgba(187, 134, 252, 0.1);
    padding: 0 2px;
    border-radius: 3px;
}

.emote-picker.hidden {
    display: none;
}

.emote-search {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #1e1e1e;
    color: #e0e0e0;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.emote-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-height: 200px;
    overflow-y: auto;
}

.admin-modal-btn {
    color: #ff4444;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin-right: 15px;
}

.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.admin-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    height: 80%;
    background: #1a1a1a;
    border-radius: 8px;
    border: 1px solid #333;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #252525;
    color: #e0e0e0;
    font-weight: bold;
    border-bottom: 1px solid #333;
}

.admin-modal-close {
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 1.4rem;
    cursor: pointer;
}

.admin-modal-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: #1a1a1a;
}

.hidden {
    display: none;
}

.home-emote-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    text-align: left;
}

.home-emote-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.home-emote-input input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #333;
    background: #0f0f0f;
    color: #e0e0e0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.home-emote-picker {
    margin-top: 10px;
}
