/* webrtc-broadcast-style.css */
.webrtc-wp-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1d2327;
    margin: 20px auto;
    max-width: 600px;
}

.webrtc-card {
    background: #ffffff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.webrtc-card-header {
    background: #f0f0f1;
    border-bottom: 1px solid #c3c4c7;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.webrtc-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.disconnect {
    background: #dcdcde;
    color: #50575e;
}

.status-badge.warning {
    background: #f0b849;
    color: #1d2327;
}

.status-badge.success {
    background: #46b450;
    color: #ffffff;
}

.status-badge.danger {
    background: #dc3232;
    color: #ffffff;
}

.webrtc-card-body {
    padding: 20px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 13px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    box-sizing: border-box;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: background 0.15s ease;
}

.btn-primary {
    background: #2271b1;
    color: #ffffff;
}

.btn-primary:hover {
    background: #135e96;
}

.btn-secondary {
    background: #f6f7f7;
    color: #2271b1;
    border: 1px solid #2271b1;
}

.btn-secondary:hover {
    background: #f0f0f1;
}

.btn-danger {
    background: #b32d2e;
    color: #ffffff;
}

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

.btn-success {
    background: #00a0d2;
    color: #ffffff;
}

.btn-success:hover {
    background: #007cba;
}

.w-full {
    width: 100%;
}

.error-msg {
    color: #b32d2e;
    font-size: 13px;
    margin-top: 10px;
}

/* Medidor de audio */
.audio-meter-container {
    margin: 15px 0;
}

.meter-label {
    font-size: 13px;
    margin-bottom: 5px;
    font-weight: 600;
}

.meter-bar-bg {
    background: #dcdcde;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.meter-bar-fill {
    background: #46b450;
    height: 100%;
    width: 0%;
    transition: width 0.1s ease;
}

/* Lista de locutores */
.participants-list h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.participants-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.participant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    margin-bottom: 5px;
    border-radius: 3px;
}

.p-name {
    font-size: 13px;
}

.p-badge {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
}

.p-badge.broadcaster {
    background: #cfe7ff;
    color: #004d99;
}

/* Cassette para oyentes */
.player-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.retro-cassette-deck {
    width: 280px;
    height: 160px;
    background: #23282d;
    border-radius: 10px;
    border: 4px solid #3c434a;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.cassette-label {
    background: #f0b849;
    color: #23282d;
    font-family: monospace;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    padding: 5px;
    border-radius: 3px;
    letter-spacing: 2px;
}

.cassette-wheels {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 50px;
    background: #1d2327;
    border-radius: 5px;
    margin: 10px 20px;
    border: 2px solid #50575e;
}

.wheel {
    width: 30px;
    height: 30px;
    background: #8c8f94;
    border-radius: 50%;
    border: 4px dashed #3c434a;
}

/* Animación de rotación de cassette al transmitir */
.status-badge.success ~ .player-body .wheel,
.success-cassette-active .wheel {
    animation: rotate-wheel 2s linear infinite;
}

@keyframes rotate-wheel {
    100% { transform: rotate(360deg); }
}

.stream-info {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Deck de controles para oyentes */
.webrtc-controls-deck {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.btn-deck {
    background: #ffffff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    color: #50575e;
    cursor: pointer;
    font-size: 14px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
}

.btn-deck:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
    color: #1d2327;
}

.btn-deck.active {
    background: #cfe7ff;
    border-color: #007cba;
    color: #004d99;
    font-weight: bold;
}

.deck-volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    margin-left: 10px;
}

.deck-label {
    font-family: monospace;
    font-size: 11px;
    font-weight: bold;
    color: #50575e;
}

.deck-volume-slider {
    flex: 1;
    height: 4px;
    background: #dcdcde;
    border: none;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
}

.deck-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    transition: background 0.15s ease;
}

.deck-volume-slider::-webkit-slider-thumb:hover {
    background: #005177;
}

.deck-value {
    font-family: monospace;
    font-size: 11px;
    font-weight: bold;
    color: #1d2327;
    width: 32px;
    text-align: right;
}

/* macOS Terminal CSS Styles */
.webrtc-terminal-card {
    background: #18181b !important;
    border: 1px solid #27272a !important;
    border-radius: 12px !important;
    margin-top: 20px !important;
    font-family: Consolas, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
    text-align: left !important;
}

.webrtc-terminal-header {
    background: #202023 !important;
    padding: 8px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: 1px solid #09090b !important;
    user-select: none !important;
}

.terminal-dots {
    display: flex !important;
    gap: 6px !important;
}

.terminal-dots .dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    display: inline-block !important;
}

.terminal-dots .dot-red { background: #ff5f56 !important; }
.terminal-dots .dot-yellow { background: #ffbd2e !important; }
.terminal-dots .dot-green { background: #27c93f !important; }

.terminal-title {
    font-size: 11px !important;
    color: #a1a1aa !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-weight: 500 !important;
}

.terminal-clear-btn {
    background: transparent !important;
    border: 1px solid #3f3f46 !important;
    border-radius: 4px !important;
    color: #a1a1aa !important;
    padding: 2px 8px !important;
    font-size: 10px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.terminal-clear-btn:hover {
    background: #27272a !important;
    border-color: #52525b !important;
    color: #ffffff !important;
}

.webrtc-terminal-body {
    padding: 16px !important;
    max-height: 180px !important;
    min-height: 110px !important;
    overflow-y: auto !important;
    color: #e4e4e7 !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    background: #18181b !important;
}

.terminal-line {
    margin: 0 !important;
    padding: 0 !important;
    white-space: pre-wrap !important;
    word-break: break-all !important;
}

.terminal-line.sys { color: #71717a !important; }
.terminal-line.info { color: #34d399 !important; font-weight: 600 !important; }
.terminal-line.conn { color: #38bdf8 !important; }
.terminal-line.warn { color: #fbbf24 !important; }
.terminal-line.err { color: #f87171 !important; font-weight: bold !important; }
.terminal-line.sig { color: #e879f9 !important; }
