/* main.css - Global styles */

:root {
	/* Colors */
	--primary: #6366f1;
	--primary-hover: #4f46e5;
	--primary-light: #818cf8;
	--secondary: #64748b;
	--secondary-hover: #475569;
	--success: #22c55e;
	--warning: #f59e0b;
	--danger: #ef4444;
	--danger-hover: #dc2626;
	
	/* Background colors */
	--bg-primary: #0f172a;
	--bg-secondary: #1e293b;
	--bg-tertiary: #334155;
	--bg-card: #1e293b;
	
	/* Text colors */
	--text-primary: #f8fafc;
	--text-secondary: #94a3b8;
	--text-muted: #64748b;
	
	/* Border */
	--border-color: #334155;
	--border-radius: 8px;
	--border-radius-lg: 12px;
	
	/* Shadows */
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
	--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
	--shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
	
	/* Transitions */
	--transition-fast: 150ms ease;
	--transition-normal: 250ms ease;
}

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

html, body {
	height: 100%;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	background-color: var(--bg-primary);
	color: var(--text-primary);
	line-height: 1.5;
}

a {
	color: var(--primary-light);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* Container */
.container {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

/* Join Container */
.join-container {
	width: 100%;
	max-width: 480px;
}

.logo {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 32px;
	color: var(--primary-light);
}

.logo h1 {
	font-size: 24px;
	font-weight: 600;
}

/* Cards */
.join-card {
	background: var(--bg-card);
	border-radius: var(--border-radius-lg);
	padding: 32px;
	box-shadow: var(--shadow-lg);
	border: 1px solid var(--border-color);
}

.join-card h2 {
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 8px;
}

.subtitle {
	color: var(--text-secondary);
	margin-bottom: 24px;
}

/* Form elements */
.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 8px;
	color: var(--text-secondary);
}

input[type="text"],
input[type="password"],
input[type="email"] {
	width: 100%;
	padding: 12px 16px;
	font-size: 16px;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	background: var(--bg-tertiary);
	color: var(--text-primary);
	transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

input::placeholder {
	color: var(--text-muted);
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 500;
	border-radius: var(--border-radius);
	border: none;
	cursor: pointer;
	transition: all var(--transition-fast);
	text-decoration: none;
}

.btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.btn-primary {
	background: var(--primary);
	color: white;
}

.btn-primary:hover:not(:disabled) {
	background: var(--primary-hover);
}

.btn-secondary {
	background: var(--bg-tertiary);
	color: var(--text-primary);
	border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
	background: var(--secondary-hover);
}

.btn-danger {
	background: var(--danger);
	color: white;
}

.btn-danger:hover:not(:disabled) {
	background: var(--danger-hover);
}

.btn-warning {
	background: var(--warning);
	color: black;
}

.btn-ghost {
	background: transparent;
	color: var(--text-secondary);
}

.btn-ghost:hover {
	background: var(--bg-tertiary);
	color: var(--text-primary);
}

.btn-block {
	width: 100%;
}

.btn-sm {
	padding: 8px 16px;
	font-size: 14px;
}

.btn-icon {
	background: transparent;
	border: none;
	color: var(--text-secondary);
	cursor: pointer;
	padding: 8px;
	border-radius: var(--border-radius);
	transition: all var(--transition-fast);
	display: flex;
	align-items: center;
	justify-content: center;
}

.btn-icon:hover {
	background: var(--bg-tertiary);
	color: var(--text-primary);
}

/* Preview container */
.preview-container {
	position: relative;
	width: 100%;
	aspect-ratio: 16/9;
	background: var(--bg-tertiary);
	border-radius: var(--border-radius);
	overflow: hidden;
	margin-bottom: 20px;
}

.preview-container video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.preview-placeholder {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: var(--text-muted);
}

.preview-placeholder p {
	margin-top: 12px;
	font-size: 14px;
}

.camera-status {
	position: absolute;
	bottom: 12px;
	left: 12px;
	padding: 6px 12px;
	background: rgba(0, 0, 0, 0.7);
	border-radius: 20px;
	font-size: 12px;
	color: var(--text-primary);
}

.camera-status.ready {
	background: rgba(34, 197, 94, 0.8);
}

.camera-status.error {
	background: rgba(239, 68, 68, 0.8);
}

/* Requirements */
.requirements {
	margin-top: 24px;
	padding: 16px;
	background: var(--bg-secondary);
	border-radius: var(--border-radius);
	border: 1px solid var(--border-color);
}

.requirements h3 {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 12px;
	color: var(--text-secondary);
}

.requirements ul {
	list-style: none;
}

.requirements li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--text-muted);
	margin-bottom: 8px;
}

.requirements li:last-child {
	margin-bottom: 0;
}

/* Error message */
.error-message {
	background: rgba(239, 68, 68, 0.1);
	border: 1px solid var(--danger);
	color: var(--danger);
	padding: 12px;
	border-radius: var(--border-radius);
	font-size: 14px;
	margin-top: 16px;
}

.error-message:empty {
	display: none;
}

/* Modals */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.modal.hidden {
	display: none;
}

.modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
}

.modal-content {
	position: relative;
	background: var(--bg-card);
	border-radius: var(--border-radius-lg);
	box-shadow: var(--shadow-lg);
	width: 100%;
	max-width: 400px;
	max-height: 90vh;
	overflow-y: auto;
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
	font-size: 18px;
	font-weight: 600;
}

.modal-body {
	padding: 20px;
}

.modal-body.text-center {
	text-align: center;
}

.modal-body.text-center svg {
	margin-bottom: 16px;
}

.modal-body.text-center h3 {
	margin-bottom: 8px;
}

.modal-body.text-center p {
	color: var(--text-secondary);
	margin-bottom: 24px;
}

/* Utility classes */
.hidden {
	display: none !important;
}

.text-center {
	text-align: center;
}

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }