* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0e0e10;
    color: #efeff1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background-color: #18181b;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 20px;
    width: 95%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    min-height: 80vh;
}

h1 {
    text-align: left;
    margin-bottom: 20px;
    color: #efeff1;
    font-size: 1.8rem;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
}

h1 svg {
    margin-right: 10px;
    fill: #9147ff;
}

.recorder-panel {
    margin-bottom: 20px;
}

.main-content {
    display: flex;
    flex-direction: column;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    order: -1; 
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
    min-width: 120px;
    transition: all 0.2s ease;
    background-color: #2a2a2d;
    color: #efeff1;
}

.btn:hover:not(:disabled) {
    background-color: #3a3a3d;
}

#startBtn {
    order: 1;
    background-color: #9147ff;
    color: white;
}

#startBtn:hover:not(:disabled) {
    background-color: #772ce8;
}

#stopBtn {
    order: 2;
    background-color: #eb0400;
    color: white;
}

#stopBtn:hover:not(:disabled) {
    background-color: #c00;
}

#streamVideoBtn {
    order: 3;
    background-color: #2a2a2d;
    color: #efeff1;
}

#streamVideoBtn:hover:not(:disabled) {
    background-color: #3a3a3d;
}

#downloadBtn {
    order: 4;
    background-color: #2a2a2d;
    color: #efeff1;
}

#downloadBtn:hover:not(:disabled) {
    background-color: #3a3a3d;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding: 8px 12px;
    background-color: #1f1f23;
    border-radius: 4px;
    font-size: 0.9rem;
}

#timer {
    font-weight: bold;
    color: #eb0400;
}

#recordingStatus {
    color: #adadb8;
}

.preview-container {
    width: 100%;
    background-color: #0e0e10;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 15px;
    position: relative;
}

#preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #0e0e10;
}

.subtitles-container {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
    pointer-events: none;
    padding: 0 20px;
}

.subtitle {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    margin: 0 auto;
    max-width: 90%;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    transition: opacity 0.1s ease;
    letter-spacing: 0.2px;
    animation: subtitleFade 0.3s ease-in-out;
}

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

.subtitle-controls {
    margin-bottom: 15px;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.toggle-wrapper input[type="checkbox"] {
    display: none;
}

.toggle-wrapper label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 12px;
    background-color: #2a2a2d;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    color: #adadb8;
    position: relative;
    padding-left: 40px;
}

.toggle-wrapper label:before {
    content: '';
    position: absolute;
    left: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #adadb8;
    transition: all 0.2s ease;
}

.toggle-wrapper input[type="checkbox"]:checked + label {
    background-color: #9147ff;
    color: white;
}

.toggle-wrapper input[type="checkbox"]:checked + label:before {
    background-color: white;
    left: calc(100% - 28px);
}

/* Chat Settings */
.chat-settings {
    background-color: #1f1f23;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.chat-settings h3 {
    margin-bottom: 12px;
    color: #efeff1;
    font-size: 1rem;
}

.checkbox-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkbox-wrapper label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 12px;
    background-color: #2a2a2d;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    color: #adadb8;
}

.custom-style-wrapper {
    position: relative;
}

.remove-style-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eb0400;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.edit-style-btn {
    position: absolute;
    top: -5px;
    right: 15px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #9147ff;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.custom-style-wrapper:hover .remove-style-btn,
.custom-style-wrapper:hover .edit-style-btn {
    opacity: 1;
}

.checkbox-wrapper input[type="checkbox"]:checked + label {
    background-color: #9147ff;
    color: white;
    box-shadow: 0 0 8px #9147ff;
}

.instructions {
    background-color: #1f1f23;
    padding: 15px;
    border-radius: 4px;
}

h2 {
    margin-bottom: 12px;
    color: #efeff1;
    font-size: 1.2rem;
}

ol {
    padding-left: 20px;
    color: #adadb8;
}

li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.settings-note {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #adadb8;
    font-style: italic;
}

/* Chat Panel Styles */
.chat-panel {
    background-color: #1f1f23;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 35px);
    position: relative;
}

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

.popout-btn {
    background: none;
    border: none;
    color: #9147ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.popout-btn svg {
    width: 16px;
    height: 16px;
    margin-left: 5px;
    fill: currentColor;
}

.popout-btn:hover {
    color: #772ce8;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 500px;
}

.popup-chat {
    background-color: #1f1f23;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.popup-chat .chat-messages {
    max-height: none;
}

.message {
    display: flex;
    margin-bottom: 8px;
    align-items: flex-start;
    flex-wrap: wrap;
    animation: fadeIn 0.2s ease-in-out;
}

.message-content {
    color: #dedee3;
    word-break: break-word;
    flex: 1 1 100%;
    padding-top: 2px;
    line-height: 1.4;
    margin-top: 2px;
}

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

.donation {
    background-color: rgba(145, 71, 255, 0.1);
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 3px solid #9147ff;
    margin-bottom: 12px;
    flex-wrap: nowrap;
    align-items: center;
}

.donation-amount {
    font-weight: bold;
    color: #9147ff;
    margin-right: 8px;
}

.chat-input-container {
    padding: 10px;
    border-top: 1px solid #2a2a2d;
    display: flex;
    flex-wrap: nowrap;
}

#chatInput {
    flex: 1;
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    background-color: #2a2a2d;
    color: #efeff1;
    margin-right: 8px;
    min-width: 0;
}

#sendBtn {
    padding: 8px 12px;
    background-color: #9147ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

#sendBtn:hover {
    background-color: #772ce8;
}

.chat-info {
    margin-top: 10px;
    padding: 10px;
    background-color: #2a2a2d;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #adadb8;
    line-height: 1.4;
}

.chat-info h3 {
    color: #9147ff;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.viewer-count {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #2a2a2d;
    padding: 5px 10px;
    border-radius: 20px;
    color: #adadb8;
    font-size: 0.9rem;
}

.viewer-count svg {
    width: 16px;
    height: 16px;
    fill: #ef4444;
}

/* Poll Feature Styles */
.poll-container {
    background-color: #1f1f23;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.poll-container h3 {
    margin-bottom: 12px;
    color: #efeff1;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.poll-container h3 button {
    background-color: #9147ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
}

.poll-container h3 button:hover {
    background-color: #772ce8;
}

.poll-form {
    margin-bottom: 15px;
}

.poll-form input {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 10px;
    border: none;
    border-radius: 4px;
    background-color: #2a2a2d;
    color: #efeff1;
}

.poll-form .option-container {
    display: flex;
    margin-bottom: 10px;
}

.poll-form .option-container input {
    flex: 1;
    margin-bottom: 0;
    margin-right: 10px;
}

.poll-form .option-container button {
    background-color: #eb0400;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    cursor: pointer;
}

.add-option-btn {
    padding: 8px 12px;
    background-color: #2a2a2d;
    color: #efeff1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.add-option-btn:hover {
    background-color: #3a3a3d;
}

.create-poll-btn {
    padding: 8px 12px;
    background-color: #9147ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.create-poll-btn:hover {
    background-color: #772ce8;
}

.active-poll {
    padding: 10px;
    background-color: #2a2a2d;
    border-radius: 4px;
}

.active-poll-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1rem;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.poll-option {
    position: relative;
    background-color: #3a3a3d;
    border-radius: 4px;
    padding: 8px 10px;
    cursor: pointer;
    overflow: hidden;
}

.poll-option:hover {
    background-color: #4a4a4d;
}

.poll-option-text {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.poll-option-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: rgba(145, 71, 255, 0.3);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.poll-timer {
    height: 4px;
    background-color: #4a4a4d;
    border-radius: 2px;
    margin-top: 15px;
    overflow: hidden;
}

.poll-timer-bar {
    height: 100%;
    background-color: #9147ff;
    width: 100%;
    transition: width linear 1s;
}

.poll-votes {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #adadb8;
}

.poll-close-btn {
    margin-top: 10px;
    padding: 6px 12px;
    background-color: #eb0400;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 0.9rem;
}

.poll-close-btn:hover {
    background-color: #c00;
}

.poll-status {
    margin-top: 10px;
    text-align: center;
    font-weight: bold;
    color: #9147ff;
}

#activePollContainer {
    margin-bottom: 15px;
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #1f1f23;
}

.ai-interval-container {
    background-color: #1f1f23;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.ai-interval-container label {
    margin-right: 10px;
    color: #adadb8;
}

#aiIntervalSelect {
    padding: 6px 10px;
    background-color: #2a2a2d;
    color: #efeff1;
    border: none;
    border-radius: 4px;
    flex: 1;
    cursor: pointer;
}

#aiIntervalSelect:hover {
    background-color: #3a3a3d;
}

/* Poll Form Input Styles */
#pollFormContainer input[type="text"],
#pollFormContainer input[type="number"] {
    background-color: #2a2a2d;
    border: 1px solid #3a3a3d;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 10px;
    width: 100%;
    color: #efeff1;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}
#pollFormContainer input[type="text"]:focus,
#pollFormContainer input[type="number"]:focus {
    border-color: #9147ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(145, 71, 255, 0.2);
}

#pollFormContainer .option-container {
    margin-bottom: 8px;
}

#pollFormContainer .option-container button {
    background-color: #3a3a3d;
    transition: background-color 0.2s ease;
}

#pollFormContainer .option-container button:hover {
    background-color: #eb0400;
}

#pollFormContainer .create-poll-btn {
    margin-top: 5px;
    font-weight: 500;
}

.create-style-btn {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #9147ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.create-style-btn:hover {
    background-color: #772ce8;
}

.custom-style-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-style-modal.active {
    opacity: 1;
    visibility: visible;
}

.custom-style-content {
    background-color: #18181b;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

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

.custom-style-form label {
    color: #adadb8;
    margin-bottom: 5px;
    display: block;
}

.custom-style-form input,
.custom-style-form textarea {
    padding: 8px 12px;
    background-color: #2a2a2d;
    border: 1px solid #3a3a3d;
    border-radius: 4px;
    color: #efeff1;
    width: 100%;
    resize: vertical;
}

.custom-style-form textarea {
    min-height: 100px;
}

.custom-style-form input:focus,
.custom-style-form textarea:focus {
    border-color: #9147ff;
    outline: none;
}

.settings-icon {
    background: none;
    border: none;
    color: #9147ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.settings-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.settings-icon:hover {
    color: #772ce8;
}

.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.settings-modal.active {
    opacity: 1;
    visibility: visible;
}

.settings-content {
    background-color: #18181b;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.settings-content h3 {
    margin-bottom: 15px;
    color: #efeff1;
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-close {
    background: none;
    border: none;
    color: #adadb8;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.settings-close:hover {
    color: #efeff1;
}

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

.settings-form label {
    color: #adadb8;
    margin-bottom: 5px;
    display: block;
}

.settings-form input {
    padding: 8px 12px;
    background-color: #2a2a2d;
    border: 1px solid #3a3a3d;
    border-radius: 4px;
    color: #efeff1;
    width: 100%;
}

.settings-form input:focus {
    border-color: #9147ff;
    outline: none;
}

.settings-form button {
    padding: 8px 16px;
    background-color: #9147ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

.settings-form button:hover {
    background-color: #772ce8;
}

.settings-form .checkbox-wrapper {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.settings-form .checkbox-wrapper input[type="checkbox"] {
    margin-right: 8px;
}

.settings-form .checkbox-wrapper label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #efeff1;
}

.settings-form small {
    color: #adadb8;
    font-size: 0.8rem;
    margin-top: 4px;
}

.btn.beta::after {
    content: 'BETA';
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #eb0400;
    color: white;
    font-size: 8px;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: bold;
}

.btn.beta {
    position: relative;
    background-color: #2a2a2d;
    color: #efeff1;
    border: 1px dashed #9147ff;
}

.btn.beta:hover:not(:disabled) {
    background-color: #3a3a3d;
}

.stream-link-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.stream-link-modal.active {
    opacity: 1;
    visibility: visible;
}

.stream-link-content {
    background-color: #18181b;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

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

.stream-link-form label {
    color: #adadb8;
    margin-bottom: 5px;
    display: block;
}

.stream-link-form input {
    padding: 8px 12px;
    background-color: #2a2a2d;
    border: 1px solid #3a3a3d;
    border-radius: 4px;
    color: #efeff1;
    width: 100%;
}

.stream-link-form input:focus {
    border-color: #9147ff;
    outline: none;
}

.stream-link-form .button-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.stream-link-form button {
    padding: 8px 16px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
}

.stream-link-form button.cancel {
    background-color: #3a3a3d;
}

.stream-link-form button.cancel:hover {
    background-color: #4a4a4d;
}

.stream-link-form button.submit {
    background-color: #9147ff;
}

.stream-link-form button.submit:hover {
    background-color: #772ce8;
}

.supported-sites {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #adadb8;
}

.supported-sites span {
    color: #9147ff;
    font-weight: 500;
}

.hint-text {
    font-size: 0.8rem;
    color: #adadb8;
    margin-top: 5px;
}

.donate-btn {
    padding: 8px 12px;
    background-color: #ff4500;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.donate-btn:hover {
    background-color: #cc3700;
}

.donation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.donation-modal.active {
    opacity: 1;
    visibility: visible;
}

.donation-content {
    background-color: #18181b;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

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

.donation-form label {
    color: #adadb8;
    margin-bottom: 5px;
    display: block;
}

.donation-form input,
.donation-form textarea {
    padding: 8px 12px;
    background-color: #2a2a2d;
    border: 1px solid #3a3a3d;
    border-radius: 4px;
    color: #efeff1;
    width: 100%;
}

.donation-form textarea {
    min-height: 80px;
    resize: vertical;
}

.donation-form input:focus,
.donation-form textarea:focus {
    border-color: #9147ff;
    outline: none;
}

.donation-form .button-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.donation-form button {
    padding: 8px 16px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    flex: 1;
}

.donation-form button.cancel {
    background-color: #3a3a3d;
}

.donation-form button.cancel:hover {
    background-color: #4a4a4d;
}

.donation-form button.submit {
    background-color: #ff4500;
}

.donation-form button.submit:hover {
    background-color: #cc3700;
}

.donation-amount-buttons {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.amount-btn {
    padding: 6px 12px;
    background-color: #2a2a2d;
    border: 1px solid #3a3a3d;
    border-radius: 4px;
    color: #efeff1;
    cursor: pointer;
    flex: 1;
    text-align: center;
}

.amount-btn:hover {
    background-color: #3a3a3d;
    border-color: #9147ff;
}

.amount-btn.selected {
    background-color: rgba(255, 69, 0, 0.2);
    border-color: #ff4500;
}

.input-with-mic {
    position: relative;
    display: flex;
    align-items: center;
}

.mic-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    margin-left: 5px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.mic-button:hover {
    background-color: #3a3a3d;
}

.mic-button.recording {
    background-color: #eb0400;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.custom-emoji-panel {
    background-color: #1f1f23;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.custom-emoji-panel h3 {
    margin-bottom: 12px;
    color: #efeff1;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.emoji-item {
    background-color: #2a2a2d;
    border-radius: 4px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.emoji-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 5px;
}

.emoji-code {
    font-size: 0.8rem;
    color: #adadb8;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-emoji-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #eb0400;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.emoji-item:hover .remove-emoji-btn {
    opacity: 1;
}

.emoji-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.emoji-modal.active {
    opacity: 1;
    visibility: visible;
}

.emoji-content {
    background-color: #18181b;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

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

.emoji-form label {
    color: #adadb8;
    margin-bottom: 5px;
    display: block;
}

.emoji-form input {
    padding: 8px 12px;
    background-color: #2a2a2d;
    border: 1px solid #3a3a3d;
    border-radius: 4px;
    color: #efeff1;
    width: 100%;
}

.emoji-preview {
    background-color: #2a2a2d;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    margin-bottom: 10px;
}

.emoji-preview img {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
}

.emoji-form .image-input-container {
    position: relative;
}

.emoji-form .image-input {
    display: none;
}

.emoji-form .image-input-label {
    display: block;
    padding: 8px 12px;
    background-color: #2a2a2d;
    border: 1px dashed #3a3a3d;
    border-radius: 4px;
    color: #adadb8;
    width: 100%;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emoji-form .image-input-label:hover {
    background-color: #3a3a3d;
    border-color: #9147ff;
}

.inline-emoji {
    vertical-align: middle;
    height: 20px;
    width: auto;
    margin: 0 2px;
}

@media (max-width: 800px) {
    .container {
        grid-template-columns: 1fr;
        padding: 15px;
        width: 100%;
        min-height: auto;
    }
    
    .controls {
        flex-direction: row;
    }
    
    .btn {
        width: auto;
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .chat-panel {
        max-height: 400px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .chat-settings .checkbox-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .checkbox-wrapper {
        flex: 0 0 48%;
        margin-bottom: 6px;
    }
    
    .checkbox-wrapper label {
        padding: 8px 10px;
        font-size: 0.8rem;
        width: 100%;
        justify-content: center;
    }
    
    .preview-container {
        aspect-ratio: 4/3;  
    }
}

@media (max-width: 480px) {
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    .chat-settings .checkbox-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .checkbox-wrapper {
        flex: 0 0 100%;
        margin-bottom: 5px;
    }
    
    .preview-container {
        aspect-ratio: 1/1;  
    }
}

.mention {
    color: #9147ff;
    font-weight: 500;
}

.message-content {
    color: #dedee3;
    word-break: break-word;
    flex: 1 1 100%;
    padding-top: 2px;
    line-height: 1.4;
    margin-top: 2px;
}

/* Custom color variations for usernames */
.color-1 { color: #ff4500; }
.color-2 { color: #0e9dd9; }
.color-3 { color: #00a94f; }
.color-4 { color: #9147ff; }
.color-5 { color: #f36895; }
.color-6 { color: #eb0400; }