/* =============================================
   TEAM Bingo — Front-End Styles
   ============================================= */

/* Reset & Base */
#bingo-app *,
#bingo-app *::before,
#bingo-app *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

#bingo-app {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	min-height: 100vh;
	background: #f5f5f5;
	color: #1a1a1a;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* ---------- HEADER ---------- */
.bingo-header {
	display: flex;
	align-items: center;
	padding: 12px 20px;
	background: #fff;
	border-bottom: 1px solid #e5e5e5;
	gap: 16px;
	flex-wrap: wrap;
}

.bingo-logo-link {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: inherit;
}

.bingo-logo {
	height: 36px;
	width: auto;
}

.bingo-logo-text {
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 2px;
	color: #e31c23;
}

.bingo-nav {
	display: flex;
	gap: 4px;
	margin-left: auto;
}

.bingo-nav-link {
	padding: 6px 14px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	color: #555;
	transition: all 0.2s;
}

.bingo-nav-link:hover {
	background: #f0f0f0;
	color: #1a1a1a;
}

.bingo-nav-link.active {
	background: #1a1a1a;
	color: #fff;
}

.bingo-user-name {
	font-size: 14px;
	font-weight: 500;
	color: #555;
}

.bingo-btn-link {
	background: none;
	border: none;
	color: #888;
	font-size: 12px;
	cursor: pointer;
	text-decoration: underline;
	padding: 4px 0;
}
.bingo-btn-link:hover {
	color: #e31c23;
}

/* ---------- MAIN ---------- */
.bingo-main {
	max-width: 640px;
	margin: 0 auto;
	padding: 32px 20px 60px;
}

/* ---------- HERO ---------- */
.bingo-hero {
	text-align: center;
	margin-bottom: 32px;
}

.bingo-hero-logo {
	height: 60px;
	width: auto;
	margin-bottom: 12px;
}

.bingo-title {
	font-size: 36px;
	font-weight: 800;
	letter-spacing: 3px;
	color: #1a1a1a;
	margin-bottom: 4px;
}

.bingo-tagline {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 2px;
	color: #888;
	text-transform: uppercase;
	margin-bottom: 12px;
}

.bingo-rules {
	font-size: 15px;
	color: #555;
}

/* ---------- CTA ---------- */
.bingo-cta {
	font-size: 14px;
	font-weight: 600;
	color: #e31c23;
	text-transform: uppercase;
	letter-spacing: 1px;
	text-align: center;
	margin-bottom: 8px;
}

.bingo-subtitle {
	text-align: center;
	font-size: 14px;
	color: #666;
	margin-bottom: 24px;
}

/* ---------- FORM ---------- */
.bingo-register-form,
.bingo-field {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.bingo-label {
	font-size: 13px;
	font-weight: 600;
	color: #333;
	margin-bottom: 4px;
}

.bingo-input,
.bingo-textarea {
	padding: 12px 14px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
	background: #fff;
}

.bingo-input:focus,
.bingo-textarea:focus {
	outline: none;
	border-color: #1a1a1a;
	box-shadow: 0 0 0 3px rgba(26,26,26,0.08);
}

.bingo-hint {
	font-size: 12px;
	color: #999;
}

/* ---------- BUTTONS ---------- */
.bingo-btn {
	padding: 10px 20px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	border: 1px solid #ddd;
	background: #fff;
	color: #333;
	transition: all 0.2s;
}

.bingo-btn:hover {
	background: #f0f0f0;
}

.bingo-btn-primary {
	background: #e31c23;
	color: #fff;
	border-color: #e31c23;
}

.bingo-btn-primary:hover {
	background: #c41820;
	border-color: #c41820;
}

.bingo-btn-primary:disabled {
	background: #ccc;
	border-color: #ccc;
	cursor: not-allowed;
}

.bingo-btn-upload {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 20px;
	background: #f5f5f5;
	border: 2px dashed #ccc;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 500;
	color: #555;
	transition: all 0.2s;
}

.bingo-btn-upload:hover {
	border-color: #1a1a1a;
	color: #1a1a1a;
}

.bingo-file-input {
	display: none;
}

/* ---------- ERROR ---------- */
.bingo-error {
	background: #fef2f2;
	color: #dc2626;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
}

/* ---------- PROGRESS ---------- */
.bingo-progress-section {
	margin-bottom: 24px;
}

.bingo-progress-stats {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	color: #555;
	margin-bottom: 8px;
}

.bingo-progress-stats strong {
	color: #1a1a1a;
	font-size: 18px;
}

.bingo-progress-bar {
	height: 6px;
	background: #e5e5e5;
	border-radius: 3px;
	overflow: hidden;
}

.bingo-progress-fill {
	height: 100%;
	background: #e31c23;
	border-radius: 3px;
	transition: width 0.4s ease;
}

.bingo-progress-hint {
	font-size: 12px;
	color: #999;
	margin-top: 6px;
}

/* ---------- WIN BANNER ---------- */
.bingo-win-banner {
	background: linear-gradient(135deg, #e31c23, #ff6b6b);
	color: #fff;
	padding: 24px;
	border-radius: 12px;
	text-align: center;
	margin-top: 16px;
	animation: bingo-pulse 2s ease infinite;
}

.bingo-win-banner h2 {
	font-size: 22px;
	margin-bottom: 6px;
}

.bingo-win-banner p {
	font-size: 14px;
	opacity: 0.9;
}

@keyframes bingo-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.01); }
}

/* ---------- BINGO GRID ---------- */
.bingo-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin-bottom: 16px;
}

.bingo-tile {
	position: relative;
	aspect-ratio: 1;
	border: 2px solid #e5e5e5;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 8px;
	text-align: center;
	transition: all 0.2s;
	overflow: hidden;
	font-family: inherit;
}

.bingo-tile:hover {
	border-color: #1a1a1a;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.bingo-tile.completed {
	border-color: #22c55e;
	background: #f0fdf4;
}

.bingo-tile.completed .bingo-tile-number {
	display: none;
}

.bingo-tile.completed .bingo-tile-label {
	font-size: 12px;
	font-weight: 600;
}

.bingo-tile .bingo-tile-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 8px;
}

.bingo-tile .bingo-tile-check {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 22px;
	height: 22px;
	background: #22c55e;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bingo-tile .bingo-tile-check::after {
	content: '\2713';
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}

.bingo-tile.completed .bingo-tile-check {
	display: flex !important;
}

.bingo-tile-number {
	font-size: 12px;
	color: #aaa;
	font-weight: 500;
}

.bingo-tile-label {
	font-size: 13px;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.2;
}

.bingo-void-note {
	font-size: 11px;
	color: #999;
	text-align: center;
	margin-top: 8px;
}

/* ---------- MODAL ---------- */
.bingo-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	padding: 20px;
}

.bingo-modal {
	background: #fff;
	border-radius: 16px;
	padding: 28px;
	width: 100%;
	max-width: 420px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.bingo-modal-title {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 20px;
}

.bingo-textarea {
	resize: vertical;
	min-height: 60px;
}

.bingo-preview {
	margin-top: 12px;
	border-radius: 8px;
	overflow: hidden;
}

.bingo-preview img {
	max-width: 100%;
	max-height: 200px;
	object-fit: cover;
	border-radius: 8px;
}

.bingo-modal-actions {
	display: flex;
	gap: 8px;
	margin-top: 20px;
}

.bingo-modal-actions .bingo-btn {
	flex: 1;
}

/* ---------- LEADERBOARD ---------- */
.bingo-lb-header {
	text-align: center;
	margin-bottom: 32px;
}

.bingo-lb-title {
	font-size: 28px;
	font-weight: 800;
	letter-spacing: 2px;
}

.bingo-lb-subtitle {
	font-size: 14px;
	color: #666;
	margin-top: 4px;
}

.bingo-lb-loading {
	text-align: center;
	color: #999;
	padding: 40px;
	font-size: 14px;
}

.bingo-lb-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
}

.bingo-lb-table th {
	background: #1a1a1a;
	color: #fff;
	padding: 10px 14px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	text-align: left;
}

.bingo-lb-table td {
	padding: 12px 14px;
	font-size: 14px;
	border-bottom: 1px solid #f0f0f0;
}

.bingo-lb-table tbody tr:hover {
	background: #fafafa;
}

.bingo-lb-table .lb-rank {
	font-weight: 700;
	color: #e31c23;
}

.bingo-lb-table .lb-rank-gold { color: #f59e0b; }
.bingo-lb-table .lb-rank-silver { color: #9ca3af; }
.bingo-lb-table .lb-rank-bronze { color: #b45309; }

.bingo-lb-table .lb-won {
	display: inline-block;
	background: #22c55e;
	color: #fff;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
}

.bingo-lb-empty {
	text-align: center;
	color: #999;
	padding: 40px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px) {
	.bingo-header {
		padding: 10px 14px;
	}

	.bingo-main {
		padding: 20px 14px 40px;
	}

	.bingo-title {
		font-size: 28px;
	}

	.bingo-grid {
		gap: 6px;
	}

	.bingo-tile-label {
		font-size: 11px;
	}

	.bingo-tile-number {
		font-size: 10px;
	}

	.bingo-nav {
		gap: 2px;
	}

	.bingo-nav-link {
		padding: 6px 10px;
		font-size: 13px;
	}
}
