* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Language Selector Styles */
.language-selector {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 1000;
}

.language-selector select {
	padding: 8px 12px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	font-size: 14px;
	cursor: pointer;
	outline: none;
	transition: all 0.2s ease;
}

.language-selector select:hover {
	background: rgba(255, 255, 255, 1);
	border-color: rgba(255, 255, 255, 0.5);
}

.language-selector select:focus {
	border-color: #e74c3c;
	box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

/* RTL Support for Arabic */
[lang="ar"] {
	direction: rtl;
	text-align: right;
}

[lang="ar"] .language-selector {
	left: 20px;
	right: auto;
}

/* Container */
.container {
	width: 100%;
	max-width: 800px;
	padding: 20px;
}

/* Header */
.header {
	text-align: center;
	margin-bottom: 40px;
}

.logo {
	display: flex;
	justify-content: center;
	align-items: center;
	color: #f8f9fa;
	font-size: 28px;
	font-weight: 600;
	margin-bottom: 20px;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.logo img {
	width: 32px;
	height: 32px;
	margin-right: 8px;
}

h1 {
	color: #f8f9fa;
	font-size: 2.2rem;
	font-weight: 300;
	margin: 0 0 15px 0;
	line-height: 1.2;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

p {
	color: #e9ecef;
	font-size: 1.1rem;
	margin: 0;
	line-height: 1.4;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Main Card */
.main-card {
	background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 50%, #8b0000 100%);
	border-radius: 16px;
	padding: 0;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	overflow: hidden;
}

/* Card Top Section */
.card-top {
	display: flex;
	padding: 30px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-left {
	flex: 1;
	display: flex;
	align-items: center;
	padding-right: 30px;
}

.card-right {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Room Section */
.room-label {
	font-size: 18px;
	color: #ffffff;
	font-weight: 500;
	line-height: 1.4;
}

.room-input-group {
	display: flex;
	gap: 10px;
	align-items: stretch;
}

.room-input {
	flex: 1;
	padding: 14px 16px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	font-size: 16px;
	background: rgba(255, 255, 255, 0.95);
	color: #333;
	font-weight: 500;
	letter-spacing: 0.5px;
}

.room-input:focus {
	outline: none;
	border-color: #e74c3c;
	box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.regenerate-btn {
	padding: 14px 16px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.95);
	cursor: pointer;
	font-size: 18px;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #333;
}

.regenerate-btn:hover {
	background: rgba(255, 255, 255, 1);
	border-color: #e74c3c;
}

.join-room-btn {
	padding: 14px 24px;
	background: #e74c3c;
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.join-room-btn:hover {
	background: #c0392b;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Recent Rooms */
.recent-rooms {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	padding: 15px;
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.recent-label {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.8);
	margin-bottom: 8px;
	font-weight: 500;
}

.recent-room {
	font-size: 16px;
	color: #e74c3c;
	font-weight: 500;
	cursor: pointer;
	padding: 8px 12px;
	border-radius: 6px;
	transition: all 0.2s ease;
	display: inline-block;
	background: rgba(231, 76, 60, 0.1);
}

.recent-room:hover {
	background: rgba(231, 76, 60, 0.2);
	transform: translateX(2px);
}

/* Card Bottom Section */
.card-bottom {
	padding: 30px;
	background: rgba(0, 0, 0, 0.2);
}

#join-form {
	display: flex;
	gap: 10px;
}

.join-input {
	flex: 1;
	padding: 14px 16px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	font-size: 16px;
	background: rgba(255, 255, 255, 0.95);
	padding-left: 45px;
	background-image: url('images/link.svg');
	background-repeat: no-repeat;
	background-position: 15px center;
	background-size: 16px;
	color: #333;
}

.join-input:focus {
	outline: none;
	border-color: #e74c3c;
	box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.join-input::placeholder {
	color: #666;
}

.join-btn {
	padding: 14px 24px;
	background: #27ae60;
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.join-btn:hover {
	background: #229954;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* Hidden elements */
.recent-rooms[style*="display: none"] {
	display: none !important;
}

#new {
	display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
	body {
		padding: 10px;
		align-items: flex-start;
		justify-content: center;
		padding-top: 80px;
	}

	.container {
		max-width: none;
		width: 100%;
		padding: 10px;
	}

	.card-top {
		flex-direction: column;
		gap: 20px;
		padding: 20px;
	}

	.card-left {
		padding-right: 0;
		text-align: center;
	}

	.card-bottom {
		padding: 20px;
	}

	.room-input-group {
		flex-direction: column;
	}

	.regenerate-btn {
		align-self: flex-start;
		width: 50px;
	}

	#join-form {
		flex-direction: column;
	}

	h1 {
		font-size: 1.8rem;
	}

	p {
		font-size: 1rem;
	}

	.language-selector {
		top: 10px;
		right: 10px;
	}

	[lang="ar"] .language-selector {
		left: 10px;
		right: auto;
	}
}

@media (max-width: 480px) {
	.card-top,
	.card-bottom {
		padding: 15px;
	}

	h1 {
		font-size: 1.5rem;
	}

	.logo {
		font-size: 24px;
	}

	.logo img {
		width: 28px;
		height: 28px;
	}

	.room-label {
		font-size: 16px;
		text-align: center;
	}
}

/* Animation for smooth transitions */
.main-card {
	animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}