/**
 * Friv Game Vault - Front-end Game Player & Embed Styling
 */

.friv-player-container {
	position: relative;
	width: 100%;
	background: #07090e;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
	margin-bottom: 25px;
	border: 1px solid #1a2234;
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 10;
}

/* 16:9 Responsive Stage */
.friv-game-stage {
	position: relative;
	width: 100%;
	padding-top: 56.25%; /* 16:9 Aspect Ratio */
	background: #000;
	overflow: hidden;
}

/* Splash Screen */
.friv-splash-screen {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
	transition: opacity 0.4s ease, visibility 0.4s ease;
}

.friv-splash-screen.friv-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.friv-splash-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: radial-gradient(circle, rgba(12, 15, 23, 0.6) 0%, rgba(7, 9, 14, 0.95) 100%);
	backdrop-filter: blur(8px);
}

.friv-splash-content {
	position: relative;
	z-index: 2;
	text-align: center;
	padding: 20px;
}

.friv-splash-title {
	margin-top: 18px;
	font-size: 24px;
	font-weight: 800;
	color: #fff;
	text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
	letter-spacing: -0.5px;
}

/* Pulsing Neon Play Button */
.friv-play-btn {
	background: linear-gradient(135deg, #00f0ff 0%, #a855f7 100%);
	border: none;
	color: #fff;
	padding: 16px 40px;
	border-radius: 50px;
	font-size: 18px;
	font-weight: 800;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	box-shadow: 0 0 25px rgba(0, 240, 255, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.3);
	animation: frivPulse 2s infinite;
	transition: transform 0.2s, box-shadow 0.2s;
}

.friv-play-btn:hover {
	transform: scale(1.08);
	box-shadow: 0 0 35px rgba(0, 240, 255, 0.9), inset 0 0 15px rgba(255, 255, 255, 0.5);
}

.friv-play-icon {
	font-size: 20px;
}

@keyframes frivPulse {
	0% {
		box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.6);
	}
	70% {
		box-shadow: 0 0 0 20px rgba(0, 240, 255, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(0, 240, 255, 0);
	}
}

/* Target Iframe */
.friv-iframe-wrapper {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.friv-iframe-wrapper iframe {
	width: 100%;
	height: 100%;
	border: none;
	display: block;
}

/* In-Game Toolbar */
.friv-player-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #0f1422;
	border-top: 1px solid #1a233a;
	padding: 10px 18px;
}

.friv-toolbar-left, .friv-toolbar-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.friv-btn-tool {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #94a3b8;
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.friv-btn-tool:hover {
	background: rgba(0, 240, 255, 0.1);
	border-color: #00f0ff;
	color: #00f0ff;
}

.friv-btn-like.friv-liked {
	color: #ff3366;
	border-color: #ff3366;
	background: rgba(255, 51, 102, 0.1);
}

.friv-views-counter {
	font-size: 13px;
	color: #64748b;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* Theater Mode */
body.friv-theater-active .friv-player-container {
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	border-radius: 0;
	z-index: 9999;
}

body.friv-theater-active .friv-game-stage {
	padding-top: 50vw; /* Taller theater experience */
	max-height: 85vh;
}

/* Lights Off Overlay */
.friv-lights-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.94);
	z-index: 9998;
	backdrop-filter: blur(10px);
}

body.friv-lights-active .friv-lights-overlay {
	display: block;
}

body.friv-lights-active .friv-player-container {
	z-index: 9999;
	box-shadow: 0 0 50px rgba(0, 240, 255, 0.3);
}

/* Shortcode Grid */
.friv-games-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 16px;
	margin: 20px 0;
}

.friv-game-card {
	background: #131b2e;
	border-radius: 10px;
	border: 1px solid #1e293b;
	overflow: hidden;
	text-decoration: none;
	display: block;
	transition: transform 0.2s, box-shadow 0.2s;
}

.friv-game-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 20px -5px rgba(0, 240, 255, 0.3);
	border-color: #00f0ff;
}

.friv-card-thumb {
	position: relative;
	padding-top: 75%;
	background-size: cover;
	background-position: center;
	background-color: #07090e;
}

.friv-rating-badge {
	position: absolute;
	top: 8px;
	right: 8px;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(4px);
	color: #ffb703;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
}

.friv-card-play-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s;
}

.friv-card-play-overlay span {
	background: #00f0ff;
	color: #000;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	box-shadow: 0 0 15px #00f0ff;
}

.friv-game-card:hover .friv-card-play-overlay {
	opacity: 1;
}

.friv-card-body {
	padding: 12px;
}

.friv-card-title {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
