* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html, body {
    height: 100%;
    overflow: hidden;
    background: #0e0e10;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #efeff1;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
    padding: 10px;
    gap: 10px;
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.player-header {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #18181b;
    border-radius: 8px 8px 0 0;
}

.player-btn {
    padding: 10px 20px;
    background: #515151; /* #9147ff; */
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    flex-shrink: 0;
}

.player-btn:hover {
    background: #772ce8;
}

.player-btn.active {
    background: #5c16c5;
}

.player-container {
    flex: 1;
    background: #000;
    border-radius: 0 0 8px 8px;
    min-height: 0;
}

.player-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 8px 8px;
}

.chat-container {
    width: 350px;
    background: #18181b;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    padding: 10px;
    background: #1f1f23;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-icon {
    width: 24px;
    height: 24px;
    background: #9147ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.chat-iframe {
    flex: 1;
    border: none;
    min-height: 0;
    border-radius: 0 0 8px 8px;
}

@media (max-width: 1200px) {
    .chat-container {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .chat-container {
        width: 100%;
        height: 300px;
    }
}
.channel-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
    flex-grow: 1;
}

.input-group label {
    margin-bottom: 5px;
    font-size: 12px;
    color: #adadb8;
}

.channel-input {
    padding: 8px 12px;
    background: #2a2a2d;
    border: 1px solid #3e3e40;
    border-radius: 4px;
    color: white;
    font-size: 14px;
}

.channel-input:focus {
    outline: none;
    border-color: #9147ff;
}

.player-buttons {
    display: flex;
    gap: 10px;
}

@media (max-width: 768px) {
    .channel-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .input-group {
        min-width: 100%;
    }
}
.player-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.player-btn-group {
    position: relative;
    display: flex;
}

.dropdown-btn {
    padding: 0 8px;
    background: #3e3e40;
    border: none;
    border-radius: 0 4px 4px 0;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: -3px; 
}

.dropdown-btn:hover {
    background: #772ce8;
}

.dropdown-input {
    position: absolute;
    top: 100%;
    left: 0;
    background: #2a2a2d;
    padding: 10px;
    border-radius: 0 0 4px 4px;
    border: 1px solid #3e3e40;
    border-top: none;
    display: none;
    z-index: 10;
    width: 300px;
}

.dropdown-input.show {
    display: flex;
    gap: 5px;
}

.channel-input {
    flex-grow: 1;
    padding: 8px;
    background: #1f1f23;
    border: 1px solid #3e3e40;
    border-radius: 4px;
    color: white;
}

.channel-input:focus {
    outline: none;
    border-color: #9147ff;
}

.apply-btn {
    padding: 8px 12px;
    background: #9147ff;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.apply-btn:hover {
    background: #772ce8;
}

@media (max-width: 768px) {
    .dropdown-input {
        width: 100%;
    }
}

.chat-selector {
    padding: 8px 16px;
    background: #1f1f23;
    border: 1px solid #3e3e40;
    margin-left: 10px;
}

.chat-selector.active {
    background: 5c16c5; /* #9147ff; */
}

.chat-option {
    display: block;
    width: 100%;
    padding: 8px;
    background: #2a2a2d;
    border: none;
    color: white;
    text-align: left;
    cursor: pointer;
    margin-bottom: 5px;
    border-radius: 4px;
}

.chat-option:hover {
    background: #3e3e40;
}

/* Новые медиа-запросы для адаптации кнопок */
@media (max-width: 992px) {
    .player-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 850px) {
    .player-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .player-btn-group {
        margin-bottom: 5px;
    }
}

@media (max-width: 768px) {
    .player-header {
        flex-wrap: wrap;
        padding: 8px;
    }
    
    .player-buttons {
        gap: 6px;
    }
    
    .player-btn {
        padding: 7px 9px;
        font-size: 11px;
    }
    
    .dropdown-btn {
        padding: 0 5px;
    }
}

@media (max-width: 480px) {
    .player-buttons {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .player-btn-group {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .player-btn {
        width: calc(100% - 30px);
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .dropdown-btn {
        width: 30px;
    }
}

#player-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: opacity 0.3s ease;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #9147ff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.player-container {
    position: relative; 
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #18181b;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

body:before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(145,71,255,0.1) 0%, rgba(0,0,0,0) 70%);
    animation: moveBackground 20s linear infinite;
    z-index: -1;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    25% { transform: translate(5%, 5%); }
    50% { transform: translate(10%, 0); }
    75% { transform: translate(5%, -5%); }
    100% { transform: translate(0, 0); }
}

.share-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.share-option {
    padding: 8px 12px;
    background: #2a2a2d;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.share-option:hover {
    background: #3e3e40;
}

.share-link-container {
    display: flex;
    gap: 8px;
}

#share-link {
    flex-grow: 1;
    padding: 8px;
    background: #1f1f23;
    border: 1px solid #3e3e40;
    border-radius: 4px;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
}

#copy-link-btn {
    padding: 8px 12px;
    background: #9147ff;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

#copy-link-btn:hover {
    background: #772ce8;
}

/* Иконки платформ */
.share-option[data-method="whatsapp"]::before {
    content: '📱';
    margin-right: 5px;
}

.share-option[data-method="telegram"]::before {
    content: '✈️';
    margin-right: 5px;
}

.share-option[data-method="discord"]::before {
    content: '🎮';
    margin-right: 5px;
}

.status-indicator {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #18181b;
}

.status-indicator.online {
  background: #e91916;
  box-shadow: 0 0 8px rgba(233, 25, 22, 0.7);
}

.status-indicator.offline {
  background: #6c757d;
}

.player-btn {
  position: relative;
  padding-right: 24px !important;
}

.viewer-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #9147ff;
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 26px;
  text-align: center;
}