body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: white;
    overflow: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #4caf50;
}

.input-section {
    background-color: #333;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

#messageInput {
    width: 70%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

#sendButton {
    width: 25%;
    padding: 10px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#sendButton:hover {
    background-color: #45a049;
}

#fullscreenButton {
    width: auto;
    padding: 10px 15px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

#fullscreenButton:hover {
    background-color: #1976d2;
}

/* 全屏弹幕模式样式 */
body.fullscreen-mode .container {
    max-width: none;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

body.fullscreen-mode .input-section {
    display: none;
}

body.fullscreen-mode .barrage-container {
    flex-grow: 1;
    height: auto;
    border-radius: 0;
}

body.fullscreen-mode h1 {
    display: none;
}

/* 纯弹幕全屏模式样式 */
body.barrage-only-mode {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body.barrage-only-mode .container {
    max-width: none;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

body.barrage-only-mode .input-section {
    display: none;
}

body.barrage-only-mode .barrage-container {
    flex-grow: 1;
    height: auto;
    border-radius: 0;
    background-color: rgba(0, 0, 0, 0.7);
}

body.barrage-only-mode h1 {
    display: none;
}

.controls {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.controls label {
    font-weight: bold;
}

.controls input[type="range"] {
    width: 100px;
}

.controls input[type="color"] {
    width: 50px;
    height: 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.barrage-container {
    position: relative;
    width: 100%;
    height: 70vh;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    overflow: hidden;
}

.barrage-item {
    position: absolute;
    right: -100px;
    white-space: nowrap;
    font-weight: bold;
    text-shadow: 1px 1px 2px black;
    pointer-events: none;
}