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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0e0e10;
    color: #efeff1;
    min-height: 100vh;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

header h1 {
    font-size: 1.5rem;
    color: #bf94ff;
}

.header-logo {
    max-width: 250px;
    height: auto;
}


.card {
    background: #18181b;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.card h2 {
    font-size: 1rem;
    color: #adadb8;
    margin-bottom: 0.75rem;
}

/* TTS Input */
textarea {
    width: 100%;
    background: #0e0e10;
    border: 1px solid #303032;
    border-radius: 6px;
    color: #efeff1;
    padding: 0.75rem;
    font-size: 0.95rem;
    resize: vertical;
    font-family: inherit;
}

textarea:focus {
    outline: none;
    border-color: #bf94ff;
}

.tts-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

#char-count {
    font-size: 0.8rem;
    color: #666;
}

/* Buttons */
.btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    background: #303032;
    color: #efeff1;
    transition: background 0.15s;
}

.btn:hover {
    background: #3a3a3d;
}

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

.btn-primary {
    background: #9147ff;
    color: #fff;
}

.btn-primary:hover {
    background: #772ce8;
}

.btn-danger {
    background: #c62828;
}

.btn-danger:hover {
    background: #a11d1d;
}

/* Twitch Controls */
.twitch-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.twitch-controls input {
    flex: 1;
    min-width: 150px;
    padding: 0.5rem 0.75rem;
    background: #0e0e10;
    border: 1px solid #303032;
    border-radius: 6px;
    color: #efeff1;
    font-size: 0.9rem;
}

.twitch-controls input:focus {
    outline: none;
    border-color: #bf94ff;
}

.twitch-status {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #adadb8;
}

.twitch-status.connected {
    color: #00e676;
}

/* Tabs */
.tab-bar {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #303032;
    padding-bottom: 0.5rem;
}

.tab {
    padding: 0.4rem 1rem;
    border: none;
    border-radius: 6px 6px 0 0;
    background: transparent;
    color: #adadb8;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.tab:hover {
    color: #efeff1;
}

.tab.active {
    color: #efeff1;
    background: #303032;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Settings Switches */
.settings {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.switch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 5rem;
}

.giftsub-row {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    padding: 0.3rem 0;
    gap: 0.75rem;
}

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

.giftsub-row input[type="number"] {
    width: 50px;
    padding: 0.3rem 0.5rem;
    background: #0e0e10;
    border: 1px solid #303032;
    border-radius: 6px;
    color: #efeff1;
    font-size: 0.9rem;
    text-align: center;
}

.giftsub-row label {
    display: flex;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
}

.giftsub-row input[type="checkbox"]:checked + label .switch {
    background: #9147ff;
}

.giftsub-row input[type="checkbox"]:checked + label .switch::after {
    transform: translateX(18px);
    background: #fff;
}

.giftsub-row input[type="number"]:focus {
    outline: none;
    border-color: #bf94ff;
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.3rem 0;
	gap: 0.75rem;
}

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

.switch {
    position: relative;
    width: 40px;
    height: 22px;
    background: #303032;
    border-radius: 11px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #666;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.switch-row input:checked + .switch {
    background: #9147ff;
}

.switch-row input:checked + .switch::after {
    transform: translateX(18px);
    background: #fff;
}

.number-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 0.3rem 0;
}

.number-row input[type="number"] {
    width: 60px;
    padding: 0.3rem 0.5rem;
    background: #0e0e10;
    border: 1px solid #303032;
    border-radius: 6px;
    color: #efeff1;
    font-size: 0.9rem;
    text-align: center;
}

.number-row input[type="number"]:focus {
    outline: none;
    border-color: #bf94ff;
}

.filter-section {
    margin-top: 0.5rem;
    padding-top: 0.4rem;
}

.filter-label {
    display: block;
    font-size: 0.8rem;
    color: #adadb8;
    margin-bottom: 0.25rem;
}

.filter-section input[type="text"],
.filter-section select {
    width: 100%;
    padding: 0.35rem 0.6rem;
    background: #0e0e10;
    border: 1px solid #303032;
    border-radius: 6px;
    color: #efeff1;
    font-size: 0.85rem;
    font-family: inherit;
}

.filter-section input[type="text"]:focus,
.filter-section select:focus {
    outline: none;
    border-color: #bf94ff;
}

.share-link-row {
    margin-top: 0.5rem;
    padding-top: 0.6rem;
    border-top: 1px solid #303032;
}

.share-label {
    display: block;
    font-size: 0.85rem;
    color: #adadb8;
    margin-bottom: 0.3rem;
}

.share-link-input {
    display: flex;
    gap: 0.4rem;
}

.share-link-input input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    background: #0e0e10;
    border: 1px solid #303032;
    border-radius: 6px;
    color: #adadb8;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-copy {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    min-width: 36px;
}

/* Queue */
.queue-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.volume-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.volume-icon {
    font-size: 1.1rem;
    cursor: pointer;
    user-select: none;
}

#volume-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #303032;
    border-radius: 2px;
    outline: none;
}

#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #9147ff;
    cursor: pointer;
}

#volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #9147ff;
    border: none;
    cursor: pointer;
}

#volume-value {
    font-size: 0.8rem;
    color: #adadb8;
    min-width: 2.5rem;
    text-align: right;
}

#queue-count {
    margin-left: auto;
    font-size: 0.85rem;
    color: #adadb8;
}

.now-playing {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #1f1f23;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #bf94ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.section-header h2 {
    margin-bottom: 0;
}

.section-header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#log-font-size {
    width: 80px;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #303032;
    border-radius: 2px;
    outline: none;
}

#log-font-size::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9147ff;
    cursor: pointer;
}

#log-font-size::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #9147ff;
    border: none;
    cursor: pointer;
}

.btn-small {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    min-width: 32px;
}

.fullscreen-log {
    position: fixed;
    inset: 0;
    z-index: 100;
    border-radius: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.fullscreen-log .message-log {
    max-height: none;
    flex: 1;
}

/* Log Filter Bar */
.log-filter-bar {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.log-filter {
    padding: 0.25rem 0.75rem;
    border: 1px solid #303032;
    border-radius: 14px;
    background: transparent;
    color: #adadb8;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.log-filter:hover {
    color: #efeff1;
    border-color: #9147ff;
}

.log-filter.active {
    background: #9147ff;
    color: #fff;
    border-color: #9147ff;
}

/* Message Log */
.message-log {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.message-log:empty::after {
    content: "Noch keine Nachrichten";
    color: #666;
    font-size: 0.85rem;
}

.log-entry {
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: inherit;
    background: #1f1f23;
}

.log-entry .username {
    color: #bf94ff;
    font-weight: 600;
}

.log-entry .text {
    color: #dedee3;
}

.log-entry.system {
    color: #adadb8;
    font-style: italic;
}

.log-entry.event {
    color: #bf94ff;
    font-weight: 600;
    border-left: 3px solid #9147ff;
	background-color: #452581;
}

.log-entry.error {
    color: #ef5350;
}

.log-entry.filtered {
    opacity: 0.4;
}

/* Scrollbar */
.message-log::-webkit-scrollbar {
    width: 6px;
}

.message-log::-webkit-scrollbar-track {
    background: transparent;
}

.message-log::-webkit-scrollbar-thumb {
    background: #303032;
    border-radius: 3px;
}
