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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

#app {
    max-width: 1500px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header Styles */
#site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

#stream-title {
    font-size: 1.5rem;
    color: #444;
}

.control-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.control-btn:hover {
    background-color: #45a049;
}

/* Settings Panel */
#settings-panel {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.hidden {
    display: none;
}

.settings-group {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.settings-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-group h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #555;
}

.btn-small {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 0.3rem 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-small:hover {
    background-color: #e0e0e0;
}

#playout-delay-slider {
    width: 100%;
    max-width: 300px;
    margin: 0.5rem 0;
}

/* Content Container */
#content-container {
    display: flex;
    gap: 1rem;
}

#stream-container {
    flex: 3;
}

#chat {
    flex: 1;
    min-width: 250px;
}

/* Stream Box Styles */
#stream-box {
    width: 100%;
    position: relative;
    background-color: #000;
    border-radius: 5px;
    overflow: hidden;
}

#stream {
    width: 100%;
    display: block;
    object-fit: contain;
}

#chat-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

/* Chat Styles */
#chat h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #444;
}

#messages {
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow-y: auto;
    padding: 0.5rem;
    background-color: white;
    margin-bottom: 1rem;
}

#chat-input {
    width: 100%;
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.input-group label {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: #555;
}

.input-group input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
}

#form button {
    width: 100%;
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 0.5rem;
    font-size: 1rem;
}

#form button:hover {
    background-color: #45a049;
}

/* Fullscreen Mode */
.fullscreen-mode #stream-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    background: black;
}

.fullscreen-mode #stream-box,
.fullscreen-mode #stream {
    width: 100%;
    height: 100%;
}

.fullscreen-mode #chat {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    #content-container {
        flex-direction: column;
    }
    
    #chat {
        margin-top: 1rem;
    }
    
    /* Additional mobile optimizations */
    #app {
        padding: 0.5rem;
    }
    
    #stream-title {
        font-size: 1.2rem;
    }
    
    .control-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .settings-group h3 {
        font-size: 0.9rem;
    }
    
    .btn-small {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    #messages {
        height: 300px;
    }
    
    #form button {
        padding: 0.5rem;
    }
}

/* Add this to your existing styles.css file */
.exit-fullscreen-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    z-index: 1001;
    display: none;
}

.exit-fullscreen-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.fullscreen-mode .exit-fullscreen-btn {
    display: block;
}

/* Update your existing fullscreen mode styles */
.fullscreen-mode #stream-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    background: black;
}

.fullscreen-mode #stream-box,
.fullscreen-mode #stream {
    width: 100%;
    height: 100%;
}

.fullscreen-mode #chat {
    display: none;
}