:root {
	--bg-dark: #0a0a12;
	--bg-deep: #07070e;
	--surface: #141422;
	--surface-light: #1c1c2e;
	--text: #eaf0ff;
	--text-dim: #a8b4d4;
	--muted: #6a7299;
	--accent-cyan: #00ffd1;
	--accent-blue: #1b9af7;
	--accent-purple: #8a2be2;
	--accent-pink: #ff25e2;
	--accent-electric: #2affde;
	--border: #2a2a3a;
	--border-light: #3a3a4a;
	--shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
	--glow: 0 0 14px rgba(0, 255, 209, 0.8);
	--glow-blue: 0 0 14px rgba(27, 154, 247, 0.8);
	--border-radius: 12px;
	--border-radius-sm:4px;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
}

body {
	background-color: var(--bg-dark);
	color: var(--text);
	height: 100vh;
	overflow: hidden;
}

.app-container {
	display: flex;
	height: 100vh;
	width: 100%;
	overflow: hidden; /* добавить */
}

.main-video-area {
	flex: 1;
	min-width: 0; /* ДОБАВИТЬ */
	background: linear-gradient(135deg, var(--bg-deep) 0%, #0c0c18 100%);
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

/* ===== СЕТКА ВИДЕО ===== */
#remoteVideo {
	width: 100%;
	height: 100%;
	display: grid;
	gap: 8px;
	background: #000;
	padding: 8px;
	box-sizing: border-box;
	position: relative;
	overflow: hidden; /* было auto */
	max-width: 100%; /* добавить */
}

/* Заглушка внутри сетки — позиционируется относительно #remoteVideo */
#remoteVideo .screen-placeholder {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 10;
	pointer-events: none;
}

.screen-placeholder {
	text-align: center;
	color: var(--text-dim);
	font-size: 18px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
}

.screen-placeholder i {
	font-size: 64px;
	color: var(--muted);
	opacity: 0.5;
}

.screen-placeholder p {
	font-size: 18px;
	color: var(--text-dim);
	margin: 0;
}

.screen-placeholder small {
	font-size: 14px;
	color: var(--muted);
}

.screen-placeholder.hidden {
	display: none;
}

/* ===== ПЛИТКА УЧАСТНИКА ===== */
.participant-tile {
	position: relative;
	background: #1a1a2e;
	border-radius: 12px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all 0.3s ease;
	min-height: 80px;
	max-height: 100%; /* добавить */
}

.participant-tile video {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* было cover */
    background: #0a0a12;
	max-width: 100%; /* добавить */
	max-height: 100%; /* добавить */
}

.participant-tile .tile-name {
	position: absolute;
	bottom: 10px;
	left: 10px;
	background: rgba(0, 0, 0, 0.7);
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 12px;
	color: #fff;
	pointer-events: none;
	z-index: 2;
	max-width: calc(100% - 20px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Когда есть главная плитка — скрываем все остальные */
#remoteVideo:has(.participant-tile.main) .participant-tile:not(.main) {
	display: none;
}

/* ===== ГЛАВНАЯ ПЛИТКА ===== */
.participant-tile.main {
	grid-column: 1 / -1;
	grid-row: 1 / -1;
	border-color: var(--accent-cyan);
	box-shadow: 0 0 30px rgba(0, 255, 209, 0.3);
	z-index: 3;
	height: 100%; /* добавить */
	width: 100%; /* добавить */
	max-width: 100%; /* добавить */
}

/* ===== АУДИО-ПАНЕЛЬ ===== */
.audio-bar {
	background: var(--surface);
	border-top: 1px solid var(--border);
	padding: 12px 20px;
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.remote-audio-info {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
}

.remote-audio-info i {
	font-size: 20px;
	color: var(--accent-cyan);
}

#remoteAudio {
	width: 200px;
	height: 40px;
	background: var(--surface-light);
	border-radius: 20px;
}

.local-audio-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

#localAudio {
	width: 150px;
	height: 40px;
	background: var(--surface-light);
	border-radius: 20px;
}

/* ===== БОКОВАЯ ПАНЕЛЬ ===== */
.control-panel {
	width: 320px;
	min-width: 320px;
	max-width: 320px;
	background: var(--surface);
	border-left: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	flex-shrink: 0;
}

.panel-header {
	padding: 10px 20px;
	border-bottom: 1px solid var(--border);
	background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
}

.panel-header h2 {
	font-size: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.panel-header h2 i {
	color: var(--accent-cyan);
	font-size: 24px;
}

.panel-header p {
	font-size: 13px;
	color: var(--text-dim);
}

.panel-section {
	padding: 20px;
	border-bottom: 1px solid var(--border-light);
}

.section-title {
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--accent-cyan);
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.input-group {
	margin-bottom: 15px;
}

.input-group label {
	display: block;
	font-size: 12px;
	color: var(--text-dim);
	margin-bottom: 6px;
}

.input-group input {
	width: 100%;
	padding: 12px 15px;
	background: var(--bg-deep);
	border: 1px solid var(--border);
	border-radius: var(--border-radius-sm);
	color: var(--text);
	font-size: 14px;
	transition: all 0.3s ease;
}

.input-group input:focus {
	outline: none;
	border-color: var(--accent-cyan);
	box-shadow: 0 0 8px rgba(0, 255, 209, 0.3);
}

.input-group input:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.btn {
	width: 100%;
	padding: 12px;
	border-radius: var(--border-radius-sm);
	border: none;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 10px;
}

.btn-primary {
	background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
	color: var(--bg-dark);
}

.btn-primary:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: var(--glow);
}

.btn-secondary {
	background: var(--surface-light);
	color: var(--text);
	border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
	border-color: var(--accent-cyan);
	color: var(--accent-cyan);
}

.btn-danger {
	background: linear-gradient(135deg, #ff3366, #ff25e2);
	color: white;
}

.btn-danger:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 0 14px rgba(255, 37, 226, 0.5);
}

.btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.btn-group {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 10px;
}

.btn-group .btn {
	flex: 1;
	min-width: calc(50% - 10px);
	margin-bottom: 0;
}

/* ===== УЧАСТНИКИ В БОКОВОЙ ПАНЕЛИ ===== */
.participants-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.participant-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	background: var(--surface-light);
	border-radius: var(--border-radius-sm);
	border: 1px solid var(--border);
	transition: all 0.3s ease;
}

.participant-item:hover {
	border-color: var(--accent-cyan);
}

.participant-avatar {
	width: 40px;
	height: 40px;
	background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.5px;
	color: #0a0a12;
	flex-shrink: 0;
	overflow: hidden;
}

.participant-avatar i {
	font-size: 16px;
	color: #0a0a12;
}

.participant-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 50%;
}

.participant-info {
	flex: 1;
}

.participant-name {
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 4px;
}

.participant-status {
	font-size: 11px;
	color: var(--text-dim);
	display: flex;
	align-items: center;
	gap: 6px;
}

.status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent-cyan);
	box-shadow: 0 0 6px var(--accent-cyan);
}

/* ===== СТАТУС ===== */
#status {
	background: var(--bg-deep);
	padding: 10px;
	border-radius: var(--border-radius-sm);
	font-size: 12px;
	color: var(--text-dim);
	text-align: center;
	margin-top: 10px;
}

/* ===== СТАТУС ПОДКЛЮЧЕНИЯ ===== */
.connection-status {
	margin-top: 15px;
	padding: 10px 12px;
	background: var(--bg-deep);
	border-radius: var(--border-radius-sm);
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	border: 1px solid var(--border);
}

.status-indicator {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--muted);
	transition: all 0.3s ease;
	flex-shrink: 0;
	box-shadow: 0 0 4px rgba(106, 114, 153, 0.5);
}

.status-indicator.connecting {
	background: linear-gradient(135deg, #ffaa00, #ff8800);
	box-shadow: 0 0 8px #ffaa00;
	animation: pulse 1s infinite;
}

.status-indicator.connected {
	background: linear-gradient(135deg, var(--accent-cyan), #00ccaa);
	box-shadow: 0 0 8px var(--accent-cyan);
}

.status-indicator.error {
	background: linear-gradient(135deg, #ff3366, #ff0066);
	box-shadow: 0 0 8px #ff3366;
}

.status-text {
	color: var(--text-dim);
	font-size: 11px;
	flex: 1;
}

@keyframes pulse {
	0% {
		opacity: 1;
		transform: scale(1);
		box-shadow: 0 0 8px #ffaa00;
	}
	50% {
		opacity: 0.7;
		transform: scale(0.9);
		box-shadow: 0 0 16px #ffaa00;
	}
	100% {
		opacity: 1;
		transform: scale(1);
		box-shadow: 0 0 8px #ffaa00;
	}
}

/* ===== ЗАПИСЬ ===== */
.btn-recording {
	background: linear-gradient(135deg, #ff3366, #ff0066);
	color: white;
	animation: recording-pulse 1s infinite;
}

.btn-recording:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 0 14px rgba(255, 51, 102, 0.5);
}

@keyframes recording-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.7);
	}
	70% {
		box-shadow: 0 0 0 10px rgba(255, 51, 102, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(255, 51, 102, 0);
	}
}

/* ===== ПОЛЯ ВВОДА ===== */
.input-row {
	display: flex;
	gap: 10px;
	margin-bottom: 15px;
}

.input-row .input-group {
	flex: 1;
	margin-bottom: 0;
}

.input-group.half {
	flex: 1;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
	.control-panel {
		width: 280px;
	}

	.btn-group {
		flex-direction: column;
	}

	.audio-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.remote-audio-info,
	.local-audio-info {
		justify-content: space-between;
	}

	.participant-tile.main {
		grid-column: 1 / 2;
		grid-row: 1 / 2;
	}

	#remoteVideo {
		gap: 4px;
		padding: 4px;
	}

	.participant-tile .tile-avatar i {
		font-size: 32px;
	}
}

.btn-muted {
    background: linear-gradient(135deg, #ff3366, #cc0033) !important;
    color: white !important;
    animation: recording-pulse 1s infinite;
}

.tile-mic-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #4ade80;
    z-index: 2;
    transition: all 0.3s ease;
}

.tile-mic-icon.muted {
    color: #ff3366;
    background: rgba(255, 51, 102, 0.2);
}

.tile-mic-icon i {
    font-size: 14px;
}

/* ===== ЗНАЧОК "НЕТ СВЯЗИ" У ЧУЖОГО УЧАСТНИКА ===== */
.tile-offline-icon {
    position: absolute;
    top: 10px;
    right: 50px;
    background: rgba(255, 51, 102, 0.9);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    z-index: 3;
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.6);
}
.tile-offline-icon.visible {
    display: flex;
}
.tile-offline-icon i {
    font-size: 14px;
}

/* ===== ЗНАЧОК "НЕТ СВЯЗИ" У ЧУЖОГО УЧАСТНИКА ===== */
.tile-offline-icon {
    position: absolute;
    top: 10px;
    right: 50px;
    background: rgba(255, 51, 102, 0.9);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    z-index: 3;
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.6);
}
.tile-offline-icon.visible {
    display: flex;
}
.tile-offline-icon i {
    font-size: 14px;
}

.panel-header-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Сворачивание панели */ 
.panel-header-top {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.panel-header-link {
	flex: 1;
	text-decoration: none;
	color: inherit;
	display: block;
}

.panel-toggle-label {
	background: var(--surface-light);
	border: 1px solid var(--border);
	border-radius: var(--border-radius-sm);
	color: var(--text-dim);
	width: 32px;
	height: 32px;
	min-width: 32px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	transition: border-color 0.3s ease, color 0.3s ease;
	flex-shrink: 0;
	order: 1;
}

.panel-toggle-label:hover {
	border-color: var(--accent-cyan);
	color: var(--accent-cyan);
}

.panel-toggle-label i {
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Свёрнутая панель */
.control-panel:has(.panel-toggle-input:checked) {
	width: 50px;
	min-width: 50px;
	max-width: 50px;
}

.control-panel:has(.panel-toggle-input:checked) .panel-header h2,
.control-panel:has(.panel-toggle-input:checked) .panel-header p,
.control-panel:has(.panel-toggle-input:checked) .panel-section,
.control-panel:has(.panel-toggle-input:checked) .panel-header-link,
.control-panel:has(.panel-toggle-input:checked) #toggleChatBtn {
	display: none;
}

.control-panel:has(.panel-toggle-input:checked) .panel-header {
	padding: 10px;
	display: flex;
	justify-content: center;
}

.control-panel:has(.panel-toggle-input:checked) .panel-toggle-label {
	transform: rotate(180deg);
}

.control-panel:has(.panel-toggle-input:checked) .panel-header-top {
	justify-content: center;
}

@media (max-width: 576px) {
	.control-panel {
		position: fixed;
		right: 0;
		top: 0;
		height: 100vh;
		transition: right 0.3s ease;
		z-index: 1100;
		width: 50px;
		min-width: 50px;
		max-width: 50px;
	}

	.main-video-area {
		margin-right: 50px;
	}

	.control-panel:has(.panel-toggle-input:checked) ~ .main-video-area {
		margin-right: 280px;
	}

	/* В свёрнутом состоянии скрываем всё */
	.control-panel .panel-header h2,
	.control-panel .panel-header p,
	.control-panel .panel-section,
	.control-panel .panel-header-link,
	.control-panel #toggleChatBtn {  /* <-- ДОБАВИТЬ */
		display: none;
	}

	.control-panel .panel-header {
		padding: 10px;
		display: flex;
		justify-content: center;
	}

	.control-panel .panel-toggle-label {
		transform: rotate(180deg);
	}

	.control-panel .panel-header-top {
		justify-content: center;
	}

	/* При активации через чекбокс — разворачиваем */
	.control-panel:has(.panel-toggle-input:checked) {
		width: 280px;
		min-width: 280px;
		max-width: 280px;
		right: 0;
	}

	.control-panel:has(.panel-toggle-input:checked) .panel-header h2,
	.control-panel:has(.panel-toggle-input:checked) .panel-header p,
	.control-panel:has(.panel-toggle-input:checked) .panel-section,
	.control-panel:has(.panel-toggle-input:checked) .panel-header-link,
	.control-panel:has(.panel-toggle-input:checked) #toggleChatBtn {  /* <-- ДОБАВИТЬ */
		display: block;
	}

	.control-panel:has(.panel-toggle-input:checked) .panel-header {
		padding: 10px 20px;
	}

	.control-panel:has(.panel-toggle-input:checked) .panel-toggle-label {
		transform: rotate(0deg);
	}

	.control-panel:has(.panel-toggle-input:checked) .panel-header-top {
		justify-content: flex-start;
	}

	#remoteVideo {
		grid-template-columns: 1fr !important;
		gap: 4px;
		padding: 4px;
	}

	.participant-tile.main {
		grid-column: 1 / -1;
		grid-row: auto;
	}

	.participant-tile {
		border-radius: 6px;
	}

	.participant-tile .tile-name {
		font-size: 10px;
		padding: 2px 8px;
		bottom: 6px;
		left: 6px;
	}
}

/* ===== КНОПКА ПЕРЕКЛЮЧЕНИЯ ЧАТА ===== */
.panel-toggle-btn {
	background: var(--surface-light);
	border: 1px solid var(--border);
	border-radius: var(--border-radius-sm);
	color: var(--text-dim);
	width: 32px;
	height: 32px;
	min-width: 32px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	transition: all 0.3s ease;
	flex-shrink: 0;
	margin-top: 2px;
}

.panel-toggle-btn:hover {
	border-color: var(--accent-cyan);
	color: var(--accent-cyan);
}

.panel-toggle-btn.active {
	border-color: var(--accent-cyan);
	color: var(--accent-cyan);
	background: rgba(0, 255, 209, 0.1);
}

/* ===== ЧАТ ===== */
.chat-section {
	display: flex;
	flex-direction: column;
	height: 100%;
	flex: 1;
	padding: 0 20px 20px 20px;
	border-bottom: none;
}

.chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 10px 0;
	max-height: 400px;
	min-height: 200px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.chat-empty {
	color: var(--text-dim);
	text-align: center;
	font-size: 13px;
	padding: 20px 0;
}

.chat-message {
	padding: 8px 12px;
	border-radius: var(--border-radius-sm);
	background: var(--surface-light);
	border: 1px solid var(--border);
	max-width: 85%;
	word-wrap: break-word;
	font-size: 13px;
	line-height: 1.4;
}

.chat-message.self {
	background: rgba(0, 255, 209, 0.1);
	border-color: var(--accent-cyan);
	align-self: flex-end;
}

.chat-message .chat-sender {
	font-weight: 600;
	font-size: 11px;
	color: var(--accent-cyan);
	margin-bottom: 2px;
}

.chat-message .chat-time {
	font-size: 10px;
	color: var(--muted);
	margin-left: 8px;
}

.chat-message .chat-text {
	color: var(--text);
}

.chat-input-row {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}

.chat-input-row input {
	flex: 1;
	padding: 10px 14px;
	background: var(--bg-deep);
	border: 1px solid var(--border);
	border-radius: var(--border-radius-sm);
	color: var(--text);
	font-size: 14px;
	outline: none;
}

.chat-input-row input:focus {
	border-color: var(--accent-cyan);
}

.chat-send-btn {
	width: auto;
	padding: 10px 16px;
	margin: 0;
	flex-shrink: 0;
	border-radius: var(--border-radius-sm);
}

.btn-mute-participant {
    background: #4ade80;
	/*background: #ff3366;*/
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    padding: 2px 8px;
    font-size: 11px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.btn-mute-participant.muted {
    background: #ff3366;
}

.btn-mute-participant:hover {
    background: #cc0033;
}

/* ===== СЛОЙ-ЗАГЛУШКА С АВАТАРОМ ПО ЦЕНТРУ ПЛИТКИ ===== */
.participant-tile .tile-avatar-layer {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a12;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.participant-tile .tile-avatar-layer.hidden {
    opacity: 0;
}
.tile-avatar-circle {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a12;
    font-weight: 700;
    font-size: 32px;
    letter-spacing: 1px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.tile-avatar-circle i {
    font-size: 40px;
    color: #0a0a12;
}
.tile-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.participant-tile.main .tile-avatar-circle {
    width: 160px;
    height: 160px;
    font-size: 56px;
}
.participant-tile.main .tile-avatar-circle i {
    font-size: 70px;
}

/* ===== БАННЕР "НЕТ СВЯЗИ" У СЕБЯ ===== */
.connection-lost-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255, 51, 102, 0.9);
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    pointer-events: none;
}
.connection-lost-banner.visible {
    transform: translateY(0);
}
.connection-lost-banner.reconnecting {
    background: rgba(255, 170, 0, 0.9);
}

/* ===== МОДАЛКА ЗАПРОСА ЭКРАНА ===== */
.screen-request-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    box-sizing: border-box;
}

.screen-request-modal.visible {
    display: flex;
}

.screen-request-modal__content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: screenRequestFadeIn 0.2s ease-out;
}

@keyframes screenRequestFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.screen-request-modal__icon {
    font-size: 48px;
    color: var(--accent-cyan);
    margin-bottom: 16px;
    line-height: 1;
}

.screen-request-modal__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

.screen-request-modal__text {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 24px;
    line-height: 1.5;
}

.screen-request-modal__text strong {
    color: var(--text);
}

.screen-request-modal__actions {
    display: flex;
    gap: 12px;
}

.screen-request-modal__btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.screen-request-modal__btn--deny {
    background: var(--surface-light);
    color: var(--text);
    border-color: var(--border);
}

.screen-request-modal__btn--deny:hover {
    border-color: #ff3366;
    color: #ff3366;
}

.screen-request-modal__btn--allow {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: var(--bg-dark);
}

.screen-request-modal__btn--allow:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 14px rgba(0, 255, 209, 0.4);
}