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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #1a1a1a;
    color: #ffffff;
}

.container {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-rows: 1fr 150px;
    height: 100vh;
    gap: 2px;
    background: #333;
}

/* DVD Section */
.dvd-section {
    grid-column: 1;
    grid-row: 1;
    background: #000;
    position: relative;
    overflow: hidden;
}

.dvd-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.dvd-logo {
    position: absolute;
    width: 120px;
    height: 60px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
    background-size: 300% 300%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 24px;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: gradientShift 3s ease infinite;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
}

.dvd-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.fullscreen-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    z-index: 1000;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.05);
}

.dvd-section:fullscreen .fullscreen-btn {
    display: none;
}

/* Chat Section */
.chat-section {
    grid-column: 2;
    grid-row: 1;
    background: #2a2a2a;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #444;
    height: 100%;
    min-height: 0;
}

.chat-header {
    padding: 15px;
    background: #333;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#userRank {
    background: #4ecdc4;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

#userRank.moderator {
    background: #feca57;
    color: #333;
}

#userRank.admin {
    background: #ff6b6b;
    color: white;
}

#userRank.owner {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
    animation: ownerGlow 2s ease-in-out infinite alternate;
}

@keyframes ownerGlow {
    0% { box-shadow: 0 0 10px rgba(255, 107, 107, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 107, 107, 0.6); }
    100% { box-shadow: 0 0 10px rgba(255, 107, 107, 0.3); }
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.tab-btn {
    background: #555;
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tab-btn.active {
    background: #4ecdc4;
}

.tab-btn:hover {
    background: #666;
    transform: translateY(-1px);
}

.auth-forms {
    position: relative;
    min-height: 120px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form.hidden {
    display: none;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    background: #333;
    border: 1px solid #555;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.auth-form input:focus {
    border-color: #4ecdc4;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

#loginBtn {
    background: #4ecdc4;
    color: white;
}

#loginBtn:hover {
    background: #45b7d1;
    transform: translateY(-1px);
}

#registerBtn {
    background: #feca57;
    color: white;
}

#registerBtn:hover {
    background: #ff9ff3;
    transform: translateY(-1px);
}

#guestBtn, #cancelRegisterBtn {
    background: #666;
    color: white;
}

#guestBtn:hover, #cancelRegisterBtn:hover {
    background: #777;
    transform: translateY(-1px);
}

.username-btn {
    background: #4ecdc4;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.username-btn:hover {
    background: #45b7d1;
    transform: translateY(-1px);
}

.chat-messages {
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 100%;
    min-height: 0;
    position: relative;
}

.message {
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.username {
    font-weight: 600;
    color: #4ecdc4;
    font-size: 12px;
}

.text {
    color: #ddd;
    font-size: 14px;
    word-wrap: break-word;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #444;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    background: #333;
    border: 1px solid #555;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input input:focus {
    border-color: #4ecdc4;
}

.chat-input button {
    padding: 10px 20px;
    background: #4ecdc4;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-input button:hover {
    background: #45b7d1;
    transform: translateY(-1px);
}

/* Viewers Section */
.viewers-section {
    grid-column: 1 / -1;
    grid-row: 2;
    background: #2a2a2a;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #444;
}

.viewers-header {
    padding: 15px;
    background: #333;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.viewers-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.viewer-count {
    background: #4ecdc4;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.viewers-list {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    overflow-y: auto;
}

.viewer {
    background: #333;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: #ddd;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #555;
    transition: all 0.3s ease;
}

.viewer:hover {
    background: #444;
    border-color: #4ecdc4;
    transform: translateY(-2px);
}

.viewer-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ecdc4;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Fullscreen styles */
.dvd-section:fullscreen {
    background: #000;
}

.dvd-section:fullscreen .dvd-container {
    width: 100vw;
    height: 100vh;
}

.dvd-section:fullscreen .fullscreen-btn {
    display: none;
}

.chat-input input:disabled {
    background: #222;
    border-color: #444;
    color: #666;
    cursor: not-allowed;
}

.chat-input button:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
}

.chat-input button:disabled:hover {
    background: #555;
    transform: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #2a2a2a;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #444;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #fff;
    font-size: 18px;
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    background: #333;
    border: 1px solid #555;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    margin-bottom: 20px;
    outline: none;
    transition: border-color 0.3s ease;
}

.modal-content input:focus {
    border-color: #4ecdc4;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#confirmUsername {
    background: #4ecdc4;
    color: white;
}

#confirmUsername:hover {
    background: #45b7d1;
    transform: translateY(-1px);
}

#cancelUsername {
    background: #555;
    color: white;
}

#cancelUsername:hover {
    background: #666;
    transform: translateY(-1px);
}

.filter-notice {
    padding: 5px 10px;
    margin: 2px 0;
    background: rgba(255, 159, 243, 0.1);
    border-left: 3px solid #ff9ff3;
    border-radius: 3px;
    font-size: 11px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.typing-indicator {
    padding: 8px 15px;
    font-size: 12px;
    color: #888;
    font-style: italic;
    border-top: 1px solid #444;
    background: #2a2a2a;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #333;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 6px;
    border: 2px solid #333;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}

::-webkit-scrollbar-corner {
    background: #333;
}

/* Firefox scrollbar */
.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #555 #333;
}
