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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 500px;
    width: 100%;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #4ecca3;
}

.subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 30px;
}

.card {
    background: #16213e;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #4ecca3;
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #0f3460;
    border-radius: 8px;
    background: #1a1a2e;
    color: #eee;
    font-size: 16px;
    margin-bottom: 12px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #4ecca3;
}

.btn {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    background: #0f3460;
    color: #eee;
    transition: background 0.2s;
}

.btn:hover {
    background: #1a4a7a;
}

.btn.primary {
    background: #4ecca3;
    color: #1a1a2e;
}

.btn.primary:hover {
    background: #3db892;
}

.btn.danger {
    background: #e94560;
}

.btn.danger:hover {
    background: #d63354;
}

.room-container {
    max-width: 600px;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.room-header h1 {
    margin: 0;
    font-size: 24px;
}

.room-info {
    background: #16213e;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.room-info strong {
    color: #4ecca3;
    font-size: 24px;
    letter-spacing: 4px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 6px;
    transition: background 0.2s, transform 0.1s;
}

.room-info strong:hover {
    background: rgba(78, 204, 163, 0.15);
}

.room-info strong:active {
    transform: scale(0.98);
}

.room-info strong.copied {
    background: rgba(78, 204, 163, 0.3);
}

.participants {
    background: #16213e;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.participants h3 {
    margin-bottom: 12px;
    color: #4ecca3;
}

#participantList {
    list-style: none;
}

#participantList li {
    padding: 10px;
    border-bottom: 1px solid #0f3460;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

#participantList li:last-child {
    border-bottom: none;
}

.participant-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-control {
    display: none;
    align-items: center;
    gap: 8px;
    padding-left: 24px;
}

#participantList li:hover .volume-control,
#participantList li:focus-within .volume-control {
    display: flex;
}

.volume-control input[type="range"] {
    flex: 1;
    max-width: 120px;
    accent-color: #4ecca3;
}

.volume-value {
    min-width: 40px;
    text-align: right;
    font-size: 0.85em;
    color: #888;
}

.speaking-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ecca3;
    opacity: 0.3;
    transition: opacity 0.1s;
}

.speaking-indicator.active {
    opacity: 1;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.controls .btn {
    width: auto;
    min-width: 120px;
}

.status {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.status.error {
    display: block;
    background: #e94560;
}

.status.success {
    display: block;
    background: #4ecca3;
    color: #1a1a2e;
}

.muted {
    background: #e94560 !important;
}

/* Room header actions */
.room-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 40px !important;
    height: 40px;
    min-width: 40px !important;
    padding: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f3460 !important;
    border-radius: 8px;
}

.icon-btn:hover {
    background: #1a4a7a !important;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Settings Modal */
.settings-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

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

.settings-modal {
    background: #16213e;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #0f3460;
}

.settings-modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #4ecca3;
}

.settings-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.settings-close-btn:hover {
    color: #eee;
}

.settings-modal-body {
    padding: 20px;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    font-size: 14px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.settings-field {
    margin-bottom: 16px;
}

.settings-field:last-child {
    margin-bottom: 0;
}

.settings-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #eee;
}

.settings-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #0f3460;
    border-radius: 8px;
    background: #1a1a2e;
    color: #eee;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.settings-select:focus {
    outline: none;
    border-color: #4ecca3;
}

.settings-select option {
    background: #16213e;
    color: #eee;
}

.settings-warning {
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid rgba(233, 69, 96, 0.3);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    color: #e94560;
    margin-top: 12px;
}

/* Toggle Switch */
.settings-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-toggle-info label {
    margin-bottom: 0;
    cursor: pointer;
}

.settings-toggle-desc {
    font-size: 12px;
    color: #888;
}

.settings-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #0f3460;
    transition: 0.3s;
    border-radius: 26px;
}

.settings-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #eee;
    transition: 0.3s;
    border-radius: 50%;
}

.settings-toggle input:checked + .settings-toggle-slider {
    background-color: #4ecca3;
}

.settings-toggle input:checked + .settings-toggle-slider:before {
    transform: translateX(22px);
}
