html {
	margin: 0;
	padding: 0;
	height: 100%;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	scroll-behavior: smooth;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body {
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	min-height: 100vh;
	color: white;
	user-select: none;
	-webkit-user-select: none;
	overflow-x: hidden;
}

/* Connection Status Bar */
.connection-error-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
	color: white;
	padding: 12px 20px;
	text-align: center;
	font-weight: 600;
	font-size: 14px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	z-index: 9999;
}

.connection-error-bar span {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 20px;
	box-sizing: border-box;
	padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.container.setup {
	justify-content: flex-start;
	overflow-y: auto;
	padding: 0;
	padding-bottom: 40px;
}

.setup-header {
	text-align: center;
	margin-bottom: 20px;
	width: 100%;
}

.title-image {
	width: 100%;
	max-width: 512px;
	height: auto;
}

.player-inputs {
	width: 100%;
	max-width: 512px;
	padding: 0 20px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.player-input-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.gender-btn {
	width: 36px;
	height: 36px;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	color: #4ecdc4;
	border-radius: 8px;
	cursor: pointer;
	font-size: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, color 0.2s ease;
	flex-shrink: 0;
}

.gender-btn:hover {
	background: rgba(255, 255, 255, 0.2);
}

.player-input {
	flex: 1;
	padding: 14px 18px;
	font-size: 16px;
	border: 2px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.05);
	color: white;
	outline: none;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.player-input::placeholder {
	color: #666;
}

.player-input:focus {
	border-color: #667eea;
	background: rgba(255, 255, 255, 0.08);
}

.remove-btn {
	width: 32px;
	height: 32px;
	border: none;
	background: rgba(255, 107, 107, 0.2);
	color: #ff6b6b;
	border-radius: 8px;
	cursor: pointer;
	font-size: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
	flex-shrink: 0;
}

.remove-btn:hover {
	background: rgba(255, 107, 107, 0.4);
}

.add-player-btn {
	margin-top: 20px;
	padding: 14px 30px;
	font-size: 16px;
	font-weight: bold;
	color: #667eea;
	background: rgba(102, 126, 234, 0.15);
	border: 2px dashed rgba(102, 126, 234, 0.4);
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 170px;
}

.add-player-btn:hover {
	background: rgba(102, 126, 234, 0.25);
	border-color: #667eea;
}

.start-game-btn {
	margin-top: 40px;
	padding: 18px 50px;
	font-size: 20px;
	font-weight: bold;
	color: white;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	border-radius: 30px;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
	box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
	animation: pulse-glow 2s ease-in-out infinite;
}

.start-game-btn:hover:not(.disabled) {
	transform: scale(1.05);
	box-shadow: 0 10px 40px rgba(102, 126, 234, 0.7);
}

.start-game-btn.disabled {
	opacity: 0.4;
	cursor: not-allowed;
	animation: none;
	box-shadow: none;
}

@keyframes pulse-glow {
	0%, 100% {
		box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
	}
	50% {
		box-shadow: 0 8px 35px rgba(102, 126, 234, 0.6);
	}
}

.player-indicator {
	text-align: center;
	margin-bottom: 30px;
}

.player-label {
	display: block;
	font-size: 14px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 2px;
}

.player-name {
	display: block;
	font-size: 32px;
	font-weight: bold;
	color: #fff;
	margin-top: 5px;
}

.card-area {
	position: relative;
	width: 280px;
	height: 380px;
}

.reveal-layer {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #2d2d44 0%, #1f1f35 100%);
	border-radius: 20px;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.reveal-layer.visible {
	opacity: 1;
}

.role {
	text-align: center;
	padding: 20px;
}

.role-icon {
	font-size: 64px;
	display: block;
	margin-bottom: 15px;
}

.role-text {
	font-size: 36px;
	font-weight: bold;
	color: #ff6b6b;
	display: block;
	letter-spacing: 4px;
}

.word-label {
	display: block;
	font-size: 16px;
	color: #888;
	margin-bottom: 10px;
}

.word-text {
	display: block;
	font-size: 42px;
	font-weight: bold;
	color: #4ecdc4;
	letter-spacing: 3px;
}

.role-hint {
	display: block;
	margin-top: 20px;
	font-size: 14px;
	color: #666;
}

.role-pack {
	display: block;
	font-size: 16px;
	color: #a8b4f0;
	margin-bottom: 15px;
	padding: 8px 16px;
	background: rgba(102, 126, 234, 0.2);
	border-radius: 20px;
}

.role-pack-icon {
	font-size: 28px;
	vertical-align: middle;
	margin-right: 8px;
}

.role-pack-name {
	font-size: 16px;
	font-weight: 500;
	vertical-align: middle;
}

.card {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #667eea;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: 20px;
	cursor: grab;
	transition: transform 0.3s ease, box-shadow 0.2s ease;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	touch-action: none;
}

.card.dragging {
	cursor: grabbing;
	transition: none;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.card.animating {
	transition: transform 0.3s ease, box-shadow 0.2s ease;
	cursor: grab;
}

.card-content {
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	padding: 30px;
	box-sizing: border-box;
	background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
	border-radius: 20px;
}

.card-instruction {
	font-size: 18px;
	text-align: center;
	text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.swipe-hint {
	margin-top: 30px;
	animation: bounce 1.5s infinite;
}

.swipe-hint.hidden {
	opacity: 0;
}

.arrow {
	font-size: 32px;
	opacity: 0.7;
}

.card-seen-message {
	margin-top: 30px;
	font-size: 16px;
	color: #4ecdc4;
	text-align: center;
	font-weight: 600;
	animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}

.next-button {
	margin-top: 30px;
	padding: 16px 40px;
	font-size: 18px;
	font-weight: bold;
	color: white;
	background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
	border: none;
	border-radius: 30px;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.next-button:hover {
	transform: scale(1.05);
	box-shadow: 0 5px 20px rgba(78, 205, 196, 0.4);
}

.next-button:active {
	transform: scale(0.98);
}

.next-button.disabled {
	background: linear-gradient(135deg, #555 0%, #444 100%);
	cursor: not-allowed;
	opacity: 0.5;
}

.next-button.disabled:hover {
	transform: none;
	box-shadow: none;
}

.player-list {
	position: fixed;
	bottom: 30px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	align-items: center;
}

.list-label {
	font-size: 12px;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.player-chip {
	padding: 8px 16px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	font-size: 14px;
	color: #888;
	transition: all 0.2s ease;
}

.player-chip.current {
	background: rgba(102, 126, 234, 0.4);
	color: white;
}

.player-chip.seen {
	background: rgba(78, 205, 196, 0.2);
	color: #4ecdc4;
}

/* Hint styles for imposter */
.role-hint-label {
	display: block;
	margin-top: 20px;
	font-size: 14px;
	color: #888;
}

.role-hint-text {
	display: block;
	font-size: 24px;
	font-weight: bold;
	color: #ffd93d;
	margin-top: 5px;
}

/* Playing phase styles */
.container.playing {
	padding-top: 40px;
	overflow-y: auto;
}

.playing-pack {
	font-size: 18px;
	color: #a8b4f0;
	margin-bottom: 10px;
	padding: 10px 20px;
	background: rgba(102, 126, 234, 0.2);
	border-radius: 20px;
	text-align: center;
}

.playing-pack-icon {
	font-size: 32px;
	vertical-align: middle;
	margin-right: 8px;
}

.playing-pack-name {
	font-size: 18px;
	font-weight: 500;
	vertical-align: middle;
}

.playing-title {
	font-size: 28px;
	margin: 0 0 10px 0;
	text-align: center;
}

.playing-subtitle {
	color: #888;
	margin: 0 0 30px 0;
	text-align: center;
}

.players-display {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
	gap: 15px;
	width: 100%;
	max-width: 400px;
	padding: 0 20px;
	box-sizing: border-box;
}

.player-card {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 16px;
	padding: 15px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	border: 2px solid transparent;
	cursor: pointer;
	transition: all 0.2s ease;
}

.player-card:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.1);
	transform: translateY(-2px);
}

.player-avatar {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-size: cover;
	background-position: center top;
}

.player-card-name {
	font-weight: bold;
	font-size: 14px;
	text-align: center;
	color: #ffffff;
}

/* First player indicator */
.player-card.first-player {
	position: relative;
	/*border: 2px solid #667eea;*/
	background: rgba(102, 126, 234, 0.15);
}

/* Voted player indicator */
.player-card.voted {
	border: 2px solid #667eea;
	background: rgba(102, 126, 234, 0.15);
}

.first-badge {
	position: absolute;
	top: -12px;
	right: -12px;
	width: 32px;
	height: 32px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: 2px solid #1a1a2e;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 16px;
	color: white;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Advertisement placeholder for future use */
.ad-placeholder {
	width: 100%;
	max-width: 400px;
	min-height: 100px;
	margin-top: 30px;
	padding: 0 20px;
	box-sizing: border-box;
}

.game-actions {
	margin-top: 40px;
	padding-bottom: 40px;
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
}

/* Vote warning message */
.vote-warning {
	background: rgba(255, 107, 107, 0.2);
	border: 2px solid #ff6b6b;
	border-radius: 12px;
	padding: 12px 16px;
	color: #ff9999;
	text-align: center;
	font-size: 14px;
	margin-bottom: 20px;
	animation: slideIn 0.3s ease;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Voting buttons */
.collect-votes-btn {
	padding: 16px 40px;
	font-size: 18px;
	font-weight: bold;
	color: white;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	border-radius: 30px;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.collect-votes-btn:hover {
	transform: scale(1.05);
	box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.skip-voting-btn {
	padding: 16px 40px;
	font-size: 18px;
	font-weight: bold;
	color: #4ecdc4;
	background: rgba(78, 205, 196, 0.15);
	border: 2px dashed rgba(78, 205, 196, 0.4);
	border-radius: 30px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.skip-voting-btn:hover {
	background: rgba(78, 205, 196, 0.25);
	border-color: #4ecdc4;
	border-style: solid;
}

/* Results phase styles */
.container.results {
	padding-top: 40px;
	overflow-y: auto;
}

.results-title {
	font-size: 32px;
	margin: 0 0 30px 0;
	text-align: center;
}

.results-reveal {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
	max-width: 320px;
}

/* Results blocks */
.result-block {
	background: #262A43;
	border-radius: 16px;
	padding-bottom: 24px;
	margin-bottom: 20px;
}

.result-pack-section {
	background: #282E52;
	padding: 16px;
	border-radius: 12px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 18px;
	color: #a8b4f0;
	justify-content: center;
}

.result-pack-icon {
	font-size: 32px;
}

.result-pack-name {
	font-weight: 500;
}

.result-section {
	text-align: center;
	margin-bottom: 20px;
}

.result-section:last-child {
	margin-bottom: 0;
}

.result-label {
	display: block;
	font-size: 11px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 2px;
	margin-bottom: 12px;
}

.result-value {
	font-size: 28px;
	font-weight: bold;
	word-wrap: break-word;
	overflow-wrap: break-word;
	word-break: break-word;
}

.result-value.long-name {
	font-size: 18px;
}

.word-value {
	color: #4ecdc4;
	text-shadow: 0 0 10px rgba(78, 205, 196, 0.6), 0 0 20px rgba(78, 205, 196, 0.3);
}

.hint-value {
	color: #ffd93d;
}

/* Voting block layout - side by side */
.voting-block {
	display: flex;
	align-items: stretch;
	gap: 0;
	padding: 14px;
}

.voting-section {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.voting-content {
	text-align: center;
	flex: 1;
}

.voting-divider {
	width: 2px;
	background: rgba(255, 255, 255, 0.1);
	margin: 0 20px;
	min-height: 200px;
}

.player-result {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin-top: 12px;
}

.result-avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background-size: cover;
	background-position: center top;
	border: 3px solid #4ecdc4;
}

.imposter-avatar {
	border-color: #ff6b6b;
}

.play-again-btn {
	margin-top: 40px;
	margin-bottom: 40px;
	padding: 18px 50px;
	font-size: 20px;
	font-weight: bold;
	color: white;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	border-radius: 30px;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.play-again-btn:hover {
	transform: scale(1.05);
	box-shadow: 0 5px 30px rgba(102, 126, 234, 0.5);
}

/* Icon Buttons (Help, Settings) */
.icon-btn {
	width: 44px;
	height: 44px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	background: rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	font-size: 24px;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	z-index: 10;
}

.icon-btn.top-left {
	/* Positioning handled by menu-dropdown container */
}

.icon-btn.top-right {
	position: fixed;
	top: 15px;
	right: 15px;
}

.icon-btn:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.5);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Fullscreen Button */
.fullscreen-btn {
	position: fixed;
	top: 15px;
	right: 15px;
	width: 44px;
	height: 44px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	background: rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	font-size: 24px;
	color: white;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.fullscreen-btn:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.5);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.fullscreen-btn:active {
	transform: scale(0.95);
}

/* Menu Dropdown */
.menu-dropdown {
	position: fixed;
	top: 15px;
	left: 15px;
	z-index: 10;
}

.menu-dropdown-menu {
	position: fixed;
	top: 59px;
	left: 15px;
	background: #1a1a2e;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	overflow: hidden;
	z-index: 11;
	min-width: 160px;
}

.menu-option {
	width: 100%;
	padding: 12px 16px;
	background: transparent;
	border: none;
	color: white;
	font-size: 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 10px;
	transition: background 0.2s ease;
	text-align: left;
}

.menu-option:hover {
	background: rgba(255, 255, 255, 0.1);
}

.menu-option:active {
	background: rgba(102, 126, 234, 0.2);
}

.menu-icon {
	font-size: 16px;
	min-width: 20px;
}

.menu-text {
	flex: 1;
}

/* Selected Packs Display */
.selected-packs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 30px;
	padding: 0 20px;
	width: 100%;
	max-width: 512px;
	box-sizing: border-box;
}

.pack-chip-container {
	position: relative;
	display: inline-flex;
}

.pack-chip {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: rgba(102, 126, 234, 0.2);
	border: none;
	border-radius: 20px;
	font-size: 13px;
	color: #a8b4f0;
	cursor: pointer;
	transition: all 0.2s ease;
}

.pack-chip:hover {
	background: rgba(102, 126, 234, 0.3);
	color: white;
}

.pack-icon {
	font-size: 14px;
}

.pack-name {
	font-weight: 500;
}

.pack-tooltip {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	background: #1a1a2e;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	padding: 12px 16px;
	min-width: 160px;
	z-index: 20;
	pointer-events: none;
	animation: fadeIn 0.2s ease-in;
	white-space: normal;
}

.pack-tooltip::after {
	content: '';
	position: absolute;
	bottom: -8px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 6px solid #1a1a2e;
}

.tooltip-content {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tooltip-title {
	font-weight: bold;
	color: white;
	font-size: 13px;
}

.tooltip-description {
	color: #888;
	font-size: 12px;
	line-height: 1.3;
}

/* Button Row */
.button-row {
	display: flex;
	gap: 12px;
	width: 100%;
	max-width: 512px;
	padding: 0 20px;
	box-sizing: border-box;
	justify-content: center;
}

.network-btn {
	margin-top: 20px;
	padding: 14px 24px;
	font-size: 16px;
	font-weight: bold;
	color: #4ecdc4;
	background: rgba(78, 205, 196, 0.15);
	border: 2px dashed rgba(78, 205, 196, 0.4);
	border-radius: 12px;
	cursor: pointer;
	min-width: 170px;
	transition: all 0.2s ease;
}

.network-btn:hover {
	background: rgba(78, 205, 196, 0.25);
	border-color: #4ecdc4;
}

.network-btn.active {
	background: rgba(78, 205, 196, 0.3);
	border-color: #4ecdc4;
	border-style: solid;
}

/* Network Players Section */
.network-players-section {
	width: 100%;
	max-width: 512px;
	padding: 0 20px;
	box-sizing: border-box;
	margin-top: 10px;
}

.network-player-row {
	background: rgba(78, 205, 196, 0.1);
	border: 1px solid rgba(78, 205, 196, 0.3);
	border-radius: 12px;
	padding: 10px 14px;
}

.network-player-row.disabled {
	opacity: 0.5;
	background: rgba(255, 255, 255, 0.05);
	border-color: rgba(255, 255, 255, 0.1);
}

.network-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background-size: cover;
	background-position: center top;
	flex-shrink: 0;
}

.network-player-name {
	flex: 1;
	font-size: 16px;
	color: #4ecdc4;
	padding: 0 10px;
}

.network-player-row.disabled .network-player-name {
	color: #888;
}

.toggle-enabled-btn {
	width: 32px;
	height: 32px;
	border: none;
	background: rgba(78, 205, 196, 0.2);
	color: #4ecdc4;
	border-radius: 8px;
	cursor: pointer;
	font-size: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.toggle-enabled-btn:hover {
	background: rgba(78, 205, 196, 0.4);
}

.toggle-enabled-btn:not(.enabled) {
	background: rgba(255, 255, 255, 0.1);
	color: #888;
}

/* Network Modal */
.network-modal {
	max-width: 400px;
}

.connection-error {
	background: rgba(255, 107, 107, 0.2);
	color: #ff6b6b;
	padding: 12px;
	border-radius: 8px;
	margin-bottom: 16px;
	text-align: center;
}

.network-choice {
	display: flex;
	gap: 16px;
}

.network-choice-btn {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 24px 16px;
	background: rgba(78, 205, 196, 0.1);
	border: 2px solid rgba(78, 205, 196, 0.3);
	border-radius: 16px;
	cursor: pointer;
	transition: all 0.2s ease;
	color: white;
}

.network-choice-btn:hover:not(:disabled) {
	background: rgba(78, 205, 196, 0.2);
	border-color: #4ecdc4;
}

.network-choice-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.choice-icon {
	font-size: 36px;
}

.choice-title {
	font-size: 18px;
	font-weight: bold;
	color: #4ecdc4;
}

.choice-desc {
	font-size: 12px;
	color: #888;
}

.connecting-status {
	text-align: center;
	color: #4ecdc4;
	margin-top: 16px;
}

/* Join Form */
.join-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.form-group label {
	font-size: 14px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.code-input,
.name-input {
	padding: 14px 18px;
	font-size: 18px;
	border: 2px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.05);
	color: white;
	outline: none;
	transition: border-color 0.2s ease;
}

.code-input:focus,
.name-input:focus {
	border-color: #4ecdc4;
}

.code-input {
	text-align: center;
	font-size: 24px;
	font-weight: bold;
	letter-spacing: 4px;
}

/* Avatar Selector */
.avatar-selector {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.avatar-btn {
	width: 48px;
	height: 48px;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, 0.1);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: all 0.2s ease;
	overflow: hidden;
}

.avatar-btn:hover {
	border-color: rgba(78, 205, 196, 0.5);
}

.avatar-btn.selected {
	border-color: #4ecdc4;
	box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

.avatar-img {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center top;
}

.upload-avatar-btn {
	margin-top: 8px;
	padding: 10px;
	font-size: 12px;
	color: #666;
	background: rgba(255, 255, 255, 0.05);
	border: 1px dashed rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	cursor: not-allowed;
}

.form-actions {
	display: flex;
	gap: 12px;
	margin-top: 8px;
}

.back-btn {
	flex: 1;
	padding: 14px;
	font-size: 16px;
	color: #888;
	background: rgba(255, 255, 255, 0.1);
	border: none;
	border-radius: 12px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.back-btn:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.2);
}

.join-btn {
	flex: 2;
	padding: 14px;
	font-size: 16px;
	font-weight: bold;
	color: white;
	background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
	border: none;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.join-btn:hover:not(:disabled) {
	transform: scale(1.02);
	box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.join-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Hosting Info */
.hosting-info {
	text-align: center;
}

.game-code-display {
	margin-bottom: 24px;
}

.game-code-display label {
	display: block;
	font-size: 14px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 8px;
}

.code-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.code-value {
	font-size: 36px;
	font-weight: bold;
	color: #4ecdc4;
	letter-spacing: 6px;
}

.copy-btn {
	padding: 10px 16px;
	font-size: 14px;
	color: white;
	background: rgba(78, 205, 196, 0.3);
	border: 1px solid #4ecdc4;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.copy-btn:hover {
	background: rgba(78, 205, 196, 0.5);
}

.waiting-info {
	color: #888;
	margin-bottom: 24px;
}

.connected-players {
	list-style: none;
	padding: 0;
	margin: 12px 0 0 0;
}

.connected-players li {
	padding: 8px;
	color: #4ecdc4;
}

.connected-players li.disabled {
	color: #666;
	text-decoration: line-through;
}

.disconnect-btn {
	padding: 12px 24px;
	font-size: 14px;
	color: #ff6b6b;
	background: rgba(255, 107, 107, 0.1);
	border: 1px solid rgba(255, 107, 107, 0.3);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.disconnect-btn:hover {
	background: rgba(255, 107, 107, 0.2);
	border-color: #ff6b6b;
}

/* Waiting for Network Players */
.waiting-network {
	padding-top: 60px;
	text-align: center;
}

.waiting-network h2 {
	color: #4ecdc4;
	margin-bottom: 30px;
}

.waiting-players-list {
	display: flex;
	flex-direction: column;
	gap: 15px;
	align-items: center;
	margin-bottom: 30px;
}

.waiting-player {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 15px 25px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	min-width: 200px;
	opacity: 0.6;
	transition: all 0.3s ease;
}

.waiting-player.ready {
	opacity: 1;
	background: rgba(78, 205, 196, 0.2);
	border: 2px solid #4ecdc4;
}

.waiting-avatar {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
}

.waiting-name {
	font-size: 1.2rem;
	flex: 1;
}

.ready-check {
	color: #4ecdc4;
	font-size: 1.5rem;
}

.all-ready {
	color: #4ecdc4;
	font-size: 1.2rem;
	margin-bottom: 20px;
}

.start-playing-btn {
	background: linear-gradient(135deg, #4ecdc4, #44a08d);
	color: white;
	border: none;
	padding: 15px 40px;
	border-radius: 30px;
	font-size: 1.2rem;
	font-weight: 600;
	cursor: pointer;
}

/* Remote Player Views */
.remote-lobby,
.remote-revealing,
.remote-playing,
.remote-results {
	padding-top: 60px;
	text-align: center;
}

.remote-header {
	margin-bottom: 30px;
}

.connected-label {
	display: block;
	font-size: 14px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.connected-code {
	display: block;
	font-size: 28px;
	font-weight: bold;
	color: #4ecdc4;
	letter-spacing: 4px;
	margin-top: 8px;
}

.players-list-card {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 16px;
	padding: 20px;
	margin: 0 auto 30px;
	max-width: 300px;
}

.players-list-card h3 {
	margin: 0 0 16px 0;
	color: #888;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.remote-players-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.remote-players-list li {
	padding: 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.remote-players-list li:last-child {
	border-bottom: none;
}

.remote-players-list li.you {
	color: #4ecdc4;
}

.remote-players-list li.disabled {
	color: #666;
	text-decoration: line-through;
}

.host-badge,
.you-badge {
	font-size: 12px;
	color: #888;
	margin-left: 8px;
}

.you-badge {
	color: #4ecdc4;
}

.waiting-message {
	color: #888;
	margin-bottom: 30px;
}

.leave-btn {
	padding: 16px 40px;
	font-size: 16px;
	color: #ff6b6b;
	background: rgba(255, 107, 107, 0.1);
	border: 2px solid rgba(255, 107, 107, 0.3);
	border-radius: 30px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.leave-btn:hover {
	background: rgba(255, 107, 107, 0.2);
	border-color: #ff6b6b;
}

/* Remote Revealing */
.remote-pack {
	margin-bottom: 20px;
	padding: 12px 24px;
	background: rgba(102, 126, 234, 0.2);
	border-radius: 20px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.pack-icon-large {
	font-size: 32px;
}

.role-display {
	padding: 40px;
	margin: 20px 0;
}

.role-display.imposter {
	color: #ff6b6b;
}

.role-display.word {
	color: #4ecdc4;
}

.role-icon-large {
	display: block;
	font-size: 80px;
	margin-bottom: 20px;
}

.role-label {
	display: block;
	font-size: 36px;
	font-weight: bold;
	letter-spacing: 4px;
}

.hint-label {
	display: block;
	margin-top: 30px;
	font-size: 14px;
	color: #888;
}

.hint-value {
	display: block;
	font-size: 24px;
	font-weight: bold;
	color: #ffd93d;
	margin-top: 8px;
}

.no-hint {
	display: block;
	margin-top: 30px;
	font-size: 18px;
	color: #ff6b6b;
}

.word-label-large {
	display: block;
	font-size: 16px;
	color: #888;
	margin-bottom: 10px;
}

.word-value-large {
	display: block;
	font-size: 42px;
	font-weight: bold;
	letter-spacing: 3px;
}

.find-imposter {
	display: block;
	margin-top: 20px;
	font-size: 14px;
	color: #666;
}

.waiting-others {
	color: #888;
	margin: 20px 0;
}

.ready-btn {
	padding: 18px 50px;
	font-size: 18px;
	font-weight: bold;
	color: white;
	background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
	border: none;
	border-radius: 30px;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-top: 20px;
}

.ready-btn:hover {
	transform: scale(1.05);
	box-shadow: 0 5px 20px rgba(78, 205, 196, 0.4);
}

/* Remote Playing */
.your-role-reminder {
	padding: 20px 40px;
	border-radius: 16px;
	margin: 30px auto;
	max-width: 300px;
}

.your-role-reminder.imposter {
	background: rgba(255, 107, 107, 0.1);
	border: 2px solid rgba(255, 107, 107, 0.3);
	color: #ff6b6b;
}

.your-role-reminder.word {
	background: rgba(78, 205, 196, 0.1);
	border: 2px solid rgba(78, 205, 196, 0.3);
	color: #4ecdc4;
}

.your-role-reminder span {
	display: block;
	font-size: 24px;
	font-weight: bold;
}

.reminder-hint {
	font-size: 14px !important;
	font-weight: normal !important;
	color: #ffd93d !important;
	margin-top: 10px;
}

.wait-for-host {
	color: #888;
	margin-top: 30px;
}

/* Remote Results */
.results-info {
	max-width: 320px;
	/*margin: 0 auto 30px;*/
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
}

.result-pack-display {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 20px;
	color: #a8b4f0;
}

.word-color {
	color: #4ecdc4;
}

.hint-color {
	color: #ffd93d;
}

/* No Hint Style */
.role-no-hint {
	display: block;
	margin-top: 20px;
	font-size: 18px;
	color: #ff6b6b;
	font-weight: bold;
}

/* Modal Styles */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	padding: 20px;
	box-sizing: border-box;
}

.modal {
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	border-radius: 20px;
	width: 100%;
	max-width: 400px;
	max-height: 90vh;
	overflow-y: auto;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
	margin: 0;
	font-size: 24px;
}

.modal-close {
	width: 36px;
	height: 36px;
	border: none;
	background: rgba(255, 255, 255, 0.1);
	color: white;
	border-radius: 8px;
	font-size: 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.modal-close:hover {
	background: rgba(255, 107, 107, 0.3);
}

.modal-content {
	padding: 20px;
}

.modal-footer {
	padding: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Setting Groups */
.setting-group {
	/*margin-bottom: 25px;*/
}

.theme-packs-group {
	margin-top: 20px;
}

.setting-group.setting-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.setting-group.setting-row .setting-label {
	margin-bottom: 0;
}

.setting-label {
	display: block;
	font-size: 14px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 12px;
}

/* Language Dropdown */
.language-dropdown {
	position: relative;
	margin-bottom: 20px;
}

.language-dropdown-btn {
	width: 100%;
	padding: 14px 16px;
	background: rgba(255, 255, 255, 0.1);
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	color: white;
	font-size: 16px;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 12px;
}

.language-dropdown-btn:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.3);
}

.language-dropdown-btn .language-name {
	flex: 1;
	text-align: left;
}

.dropdown-arrow {
	font-size: 10px;
	color: #888;
}

.language-dropdown-menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	margin-top: 4px;
	background: #1a1a2e;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 12px;
	overflow: hidden;
	z-index: 10;
}

.language-option {
	width: 100%;
	padding: 14px 16px;
	background: transparent;
	border: none;
	color: white;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 12px;
	transition: background 0.2s ease;
}

.language-option:hover {
	background: rgba(255, 255, 255, 0.1);
}

.language-option.selected {
	background: rgba(102, 126, 234, 0.2);
}

.language-option .language-name {
	flex: 1;
	text-align: left;
}

.check-mark {
	color: #4ecdc4;
}

/* Flag icon sizing */
.language-dropdown-btn .fi,
.language-option .fi {
	font-size: 20px;
	width: 24px;
}

/* Toggle Button */
.toggle-btn {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: white;
}

.toggle-track {
	width: 50px;
	height: 28px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 14px;
	position: relative;
	transition: background 0.2s ease;
}

.toggle-btn.active .toggle-track {
	background: #4ecdc4;
}

.toggle-thumb {
	position: absolute;
	top: 4px;
	left: 4px;
	width: 20px;
	height: 20px;
	background: white;
	border-radius: 50%;
	transition: transform 0.2s ease;
}

.toggle-btn.active .toggle-thumb {
	transform: translateX(22px);
}

.toggle-label {
	font-size: 16px;
}

/* Theme Packs Grid */
.packs-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.pack-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 16px 12px;
	background: rgba(255, 255, 255, 0.05);
	border: 2px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	color: white;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
}

.pack-btn:hover {
	background: rgba(255, 255, 255, 0.1);
}

.pack-btn.selected {
	background: rgba(102, 126, 234, 0.2);
	border-color: #667eea;
}

.pack-btn-icon {
	font-size: 28px;
}

.pack-btn-name {
	font-size: 12px;
	text-align: center;
	line-height: 1.2;
}

.pack-btn-check {
	position: absolute;
	top: 8px;
	right: 8px;
	font-size: 14px;
	color: #4ecdc4;
}

/* Save Button */
.save-btn {
	width: 100%;
	padding: 16px;
	font-size: 18px;
	font-weight: bold;
	color: white;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	border-radius: 12px;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.save-btn:hover {
	transform: scale(1.02);
	box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Help Modal Styles */
.help-modal {
	max-width: 500px;
}

.help-tabs {
	display: flex;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.help-tab {
	flex: 1;
	padding: 14px 16px;
	background: transparent;
	border: none;
	color: #888;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	border-bottom: 2px solid transparent;
}

.help-tab:hover {
	color: white;
	background: rgba(255, 255, 255, 0.05);
}

.help-tab.active {
	color: white;
	border-bottom-color: #667eea;
}

.help-content {
	max-height: 50vh;
	overflow-y: auto;
}

.help-section h1 {
	color: #667eea;
	font-size: 18px;
	margin: 0 0 12px 0;
}

.help-section a {
	color: #667eea;
}

.help-section h1:not(:first-child) {
	margin-top: 24px;
}

.help-section p {
	color: #ccc;
	line-height: 1.6;
	margin: 0 0 12px 0;
}

.help-section ol,
.help-section ul {
	color: #ccc;
	line-height: 1.8;
	margin: 0 0 12px 0;
	padding-left: 24px;
}

.help-section li {
	margin-bottom: 8px;
}

.help-section strong {
	color: white;
}
