/* Base mobile optimizations */
.mobile-device {
	-webkit-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.mobile-device * {
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
}

.mobile-device input,
.mobile-device textarea {
	-webkit-user-select: text;
	user-select: text;
}

/* Improve drag and drop on mobile */
.mobile-device .tile {
	touch-action: none;
}

.mobile-device .tile-tray,
.mobile-device .play-area {
	touch-action: pan-x;
}

body {
	font-family: sans-serif;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.tile-tray,
.play-area {
	display: flex;
	gap: 10px;
	margin: 20px;
	margin-bottom: 20px; /* Normal margin */
	min-height: 120px; /* Increased height for larger drop target */
	border: 2px dashed #ccc;
	padding: 20px; /* Increased padding for larger drop area */
	padding-bottom: 60px; /* Space for arrows within container */
	flex-wrap: nowrap;
	overflow-x: auto;
	overflow-y: hidden; /* Prevent arrows from causing scrollbars */
	justify-content: center; /* Center tiles in fixed-width container */
	width: calc(100% - 40px); /* Full width minus margins */
	box-sizing: border-box;
}
.tile {
	width: 60px;
	height: 60px;
	perspective: 1000px;
	cursor: pointer;
	position: relative;
}
.tile-inner {
	position: relative;
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
	transition: transform 0.6s;
}
.tile.flipped .tile-inner {
	transform: rotateY(180deg);
}
.tile.disabled {
	pointer-events: none;
	opacity: 0.6;
	cursor: not-allowed;
}
.tile-face {
	position: absolute;
	width: 100%;
	height: 100%;
	backface-visibility: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	background: #eee;
	border: 1px solid #aaa;
}
.tile-face.back {
	transform: rotateY(180deg);
	background: #ddd;
}
.tile-preview {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 20px;
	height: 20px;
	background: rgba(0, 0, 0, 0.7);
	color: white;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 2px;
	z-index: 10;
	opacity: 0;
	transition: opacity 0.3s ease;
}
.easy-mode .tile-preview {
	opacity: 1;
}
.tile-arrow {
	position: absolute;
	bottom: -20px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-top: 12px solid #f97d22;
	cursor: pointer;
	z-index: 5;
}

/* Add invisible clickable area for better touch targets */
.tile-arrow::before {
	content: "";
	position: absolute;
	top: -20px;
	left: -20px;
	width: 40px;
	height: 40px;
	background: transparent;
	border-radius: 50%;
}
.tile-arrow:hover {
	opacity: 1;
	border-top-color: #e56a0f;
	transform: scale(1.1);
}
.tile-arrow.hidden {
	display: none;
}
.valid-word {
	border: 2px solid #28a745;
}
.invalid-word {
	border: 2px solid red;
}

/* Background flash animations for submission feedback */
.game-screen.submission-success::before,
.game-screen.submission-error::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	z-index: 1000;
}

@keyframes successFlash {
	0% {
		background-color: rgba(40, 167, 69, 0);
	}
	30% {
		background-color: rgba(40, 167, 69, 0.2);
	}
	100% {
		background-color: rgba(40, 167, 69, 0);
	}
}

@keyframes errorFlash {
	0% {
		background-color: rgba(220, 53, 69, 0);
	}
	30% {
		background-color: rgba(220, 53, 69, 0.2);
	}
	100% {
		background-color: rgba(220, 53, 69, 0);
	}
}

.game-screen.submission-success::before {
	animation: successFlash 1.2s ease-out;
}

.game-screen.submission-error::before {
	animation: errorFlash 1.2s ease-out;
}

/* ========================================
   NEW DRAG-AND-DROP INTERFACE STYLES
   ======================================== */

/* Daily Challenge Styling */
.daily-challenge-header {
	background: linear-gradient(135deg, #f8f9fa, #e9ecef);
	border: 2px solid #f97d22;
	border-radius: 12px;
	padding: 15px;
	margin-bottom: 20px;
	text-align: center;
}

.challenge-date {
	margin: 0 0 8px 0;
	font-size: 1.2em;
	color: #333;
	font-weight: 600;
}

.challenge-stats {
	font-size: 0.9em;
	color: #666;
}

.challenge-progress {
	background: #f97d22;
	color: white;
	padding: 4px 12px;
	border-radius: 15px;
	font-weight: 500;
}

/* Mobile optimizations for daily challenge */
@media (max-width: 768px) {
	.daily-challenge-header {
		padding: 12px;
		margin-bottom: 15px;
	}

	.challenge-date {
		font-size: 1.1em;
	}
}

.drag-drop-interface {
	width: 100%;
	max-width: 700px;
	margin: 20px auto;
	padding: 0 10px;
}

.play-rack-container,
.holding-area-container {
	margin-bottom: 20px;
}

.container-title {
	font-size: 16px;
	font-weight: 600;
	color: #555;
	margin-bottom: 8px;
	text-align: left;
	padding: 0 5px;
}

.tile-container {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	min-height: 80px;
	padding: 15px;
	border-radius: 12px;
	position: relative;
	transition: all 0.3s ease;
}

/* Play Rack Styles */
.play-rack {
	background: linear-gradient(135deg, #f8f9fa, #e9ecef);
	border: 3px dashed #f97d22;
	box-shadow: 0 2px 8px rgba(249, 125, 34, 0.1);
}

.play-rack:empty .drop-zone-hint {
	display: block;
}

.play-rack.sortable-drag {
	background: linear-gradient(135deg, #fff3e0, #ffe0b2);
	border-color: #ff9800;
	transform: scale(1.02);
}

/* Holding Area Styles */
.holding-area {
	background: linear-gradient(135deg, #fafafa, #f5f5f5);
	border: 2px dashed #bbb;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.holding-area:empty .drop-zone-hint {
	display: block;
}

.holding-area.sortable-drag {
	background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
	border-color: #888;
}

/* Drop Zone Hint */
.drop-zone-hint {
	display: none;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: #999;
	font-style: italic;
	pointer-events: none;
	font-size: 14px;
}

/* Sortable Ghost/Placeholder */
.sortable-ghost {
	opacity: 0.3;
	background: rgba(249, 125, 34, 0.1);
	border: 2px dashed #f97d22;
}

.sortable-chosen {
	z-index: 1000;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Mobile-specific fallback drag styling */
.sortable-fallback {
	opacity: 0.8 !important;
	transform: scale(1.05) rotate(2deg) !important;
	z-index: 10000 !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
	border: 2px solid var(--primary-color) !important;
}

/* RADICAL FIX: Completely override tile content during drag */
.sortable-chosen .tile-inner,
.sortable-drag .tile-inner,
.sortable-fallback .tile-inner {
	transform: none !important;
	transform-style: flat !important;
}

/* Hide both faces during drag and show content via pseudo-element */
.sortable-chosen .tile-face,
.sortable-drag .tile-face,
.sortable-fallback .tile-face {
	display: none !important;
}

/* Show correct letter via CSS content */
.sortable-chosen::before,
.sortable-drag::before,
.sortable-fallback::before {
	content: attr(data-front);
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex !important;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	font-weight: bold;
	background: #eee;
	border: 1px solid #aaa;
	border-radius: 8px;
	z-index: 10;
}

/* Show back letter for flipped tiles */
.sortable-chosen.flipped::before,
.sortable-drag.flipped::before,
.sortable-fallback.flipped::before {
	content: attr(data-back);
}

/* Override any conflicting transforms during drag */
.sortable-chosen,
.sortable-drag,
.sortable-fallback {
	transform: none !important;
	position: relative !important;
}

/* Enhanced tile styles for drag-and-drop */
.drag-drop-interface .tile {
	cursor: grab;
	transition: all 0.2s ease;
}

.drag-drop-interface .tile:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.drag-drop-interface .tile:active {
	cursor: grabbing;
	transform: scale(0.98);
}

/* Hide arrows in drag-drop mode */
.drag-drop-interface .tile-arrow {
	display: none;
}

/* Mobile optimizations for drag-drop */
@media (max-width: 768px) {
	.drag-drop-interface {
		padding: 0 5px;
	}

	.tile-container {
		min-height: 70px;
		padding: 12px;
		gap: 6px;
	}

	.container-title {
		font-size: 14px;
		margin-bottom: 6px;
	}

	/* Make tiles smaller on mobile to fit 7 tiles in one row */
	.drag-drop-interface .tile {
		width: 50px;
		height: 50px;
	}

	/* Adjust gap between tiles for tighter spacing */
	.play-rack {
		gap: 4px;
	}

	/* Position submit button on its own line in new interface on mobile */
	body.new-interface .submit-button-row {
		display: flex;
		justify-content: center;
		margin: 10px 0 8px 0;
	}

	body.new-interface .submit-button-row #submitBtn {
		width: 80%;
		max-width: 280px;
		font-size: 16px;
		padding: 14px 20px;
	}

	body.new-interface .other-buttons-row {
		display: flex;
		justify-content: center;
		gap: 8px;
		flex-wrap: wrap;
		margin-bottom: 10px;
	}

	body.new-interface .other-buttons-row button {
		flex: 1 1 auto;
		min-width: 80px;
		max-width: 120px;
		font-size: 14px;
	}
}

/* Extra small mobile screens - even smaller tiles */
@media (max-width: 480px) {
	.drag-drop-interface .tile {
		width: 45px;
		height: 45px;
	}

	.play-rack {
		gap: 3px;
		padding: 10px;
	}

	.tile-container {
		padding: 10px;
		min-height: 65px;
	}

	/* Enhanced submit button positioning for very small screens in new interface */
	body.new-interface .submit-button-row {
		margin: 8px 0 6px 0;
	}

	body.new-interface .submit-button-row #submitBtn {
		width: 85%;
		max-width: 300px;
		font-size: 17px;
		padding: 16px 24px;
		font-weight: 600;
	}

	body.new-interface .other-buttons-row {
		gap: 6px;
		margin-bottom: 8px;
	}

	body.new-interface .other-buttons-row button {
		min-width: 70px;
		max-width: 110px;
		font-size: 13px;
		padding: 10px 8px;
	}
}
button {
	margin: 1px;
	padding: 10px 20px;
	font-size: 16px;
	border-radius: 5px;
	border: 1px solid #ccc;
	background: #f9f9f9;
	cursor: pointer;
	transition: all 0.2s ease;
}

/* Primary action button styling */
#submitBtn {
	background: linear-gradient(135deg, #f97d22, #e56a0f);
	color: white;
	border: 2px solid #f97d22;
	font-weight: bold;
	font-size: 18px;
	padding: 14px 28px;
	box-shadow: 0 4px 8px rgba(249, 125, 34, 0.3);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	position: relative;
	overflow: hidden;
}

#submitBtn:hover {
	background: linear-gradient(135deg, #e56a0f, #f97d22);
	box-shadow: 0 6px 12px rgba(249, 125, 34, 0.4);
	transform: translateY(-2px);
}

#submitBtn:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(249, 125, 34, 0.3);
}

#submitBtn:disabled {
	background: linear-gradient(135deg, #cccccc, #b8b8b8);
	border-color: #cccccc;
	color: #666666;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

/* Success animation for submit button */
@keyframes submitSuccess {
	0% {
		background: linear-gradient(135deg, #f97d22, #e56a0f);
		transform: scale(1);
	}
	50% {
		background: linear-gradient(135deg, #ff9e47, #f97d22);
		transform: scale(1.05);
		box-shadow: 0 8px 20px rgba(249, 125, 34, 0.6);
	}
	100% {
		background: linear-gradient(135deg, #f97d22, #e56a0f);
		transform: scale(1);
	}
}

#submitBtn.success {
	animation: submitSuccess 0.6s ease-out;
}

button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.tray-controls {
	text-align: center;
	margin: -10px 0 10px 0;
}

.flip-all-btn {
	background: #f97d22;
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	margin: 0;
}

.flip-all-btn:hover {
	background: #e56a0f;
}

.flip-all-btn:active {
	transform: translateY(1px);
}
/* Swap button container */
.swap-button-container {
	display: flex;
	justify-content: center;
	margin: 5px 0;
}

.swap-tiles-btn {
	background-color: #f0f0f0;
	color: #333;
	padding: 1px 16px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s ease;
	height: 24px; /* Even shorter */
	line-height: 1;
	box-sizing: border-box;
}

.swap-tiles-btn:hover {
	background-color: #e0e0e0;
	transform: scale(1.05);
}

.swap-tiles-btn:active {
	background-color: #d0d0d0;
	transform: scale(0.95);
}

.autocomplete-container {
	margin: 20px 0;
	padding: 15px;
	background: #f0f8ff;
	border: 2px solid #f97d22;
	border-radius: 8px;
	max-width: 600px;
	display: none;
}

.autocomplete-title {
	font-weight: bold;
	color: #e56a0f;
	margin-bottom: 10px;
	font-size: 16px;
}

.autocomplete-words {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.autocomplete-word {
	background: #f97d22;
	color: white;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: bold;
	cursor: pointer;
	transition: background-color 0.2s;
}

.autocomplete-word:hover {
	background: #e56a0f;
}

.played-words-section {
	margin: 20px 0;
	padding: 15px;
	background: #f9f9f9;
	border: 2px solid #ddd;
	border-radius: 8px;
	max-width: 600px;
	min-height: 60px;
}

.played-words-section h3 {
	margin: 0 0 10px 0;
	color: #333;
	font-size: 18px;
}

.played-words-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.played-word {
	background: #2196f3;
	color: white;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: bold;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.played-word-points {
	background: rgba(255, 255, 255, 0.2);
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 12px;
}

.played-words-empty {
	color: #666;
	font-style: italic;
	text-align: center;
	padding: 20px;
}

#scoreboard {
	display: flex;
	gap: 20px;
}

#scoreboard div:has(#highScore) {
	color: #f97d22;
	font-weight: bold;
}

#highScore {
	color: #f97d22;
	font-weight: bold;
}

/* Solutions Modal Styles */
.solutions-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

.solutions-content {
	background: white;
	border-radius: 12px;
	padding: 24px;
	max-width: 90vw;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.solutions-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	border-bottom: 2px solid #eee;
	padding-bottom: 15px;
}

.solutions-header h2 {
	margin: 0;
	color: #333;
	font-size: 24px;
}

.close-solutions {
	background: #f44336;
	color: white;
	border: none;
	border-radius: 50%;
	width: 35px;
	height: 35px;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.close-solutions:hover {
	background: #d32f2f;
}

.solutions-stats {
	display: flex;
	gap: 20px;
	margin-bottom: 25px;
	flex-wrap: wrap;
	justify-content: center;
}

.stat {
	background: #f5f5f5;
	padding: 10px 15px;
	border-radius: 8px;
	font-weight: bold;
	text-align: center;
	min-width: 100px;
}

.found-count {
	color: #f97d22;
}

.missed-count {
	color: #f44336;
}

.total-count {
	color: #2196f3;
}

.possible-points {
	color: #ff9800;
}

.solutions-lists {
	max-height: 60vh;
	overflow-y: auto;
}

.solutions-section {
	margin-bottom: 25px;
}

.solutions-section h3 {
	margin: 0 0 15px 0;
	font-size: 18px;
	padding: 10px;
	border-radius: 6px;
}

.found-section h3 {
	background: #ffeee6;
	color: #e56a0f;
}

.missed-section h3 {
	background: #ffebee;
	color: #c62828;
}

.solutions-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 8px;
}

.solution-item {
	padding: 8px 12px;
	border-radius: 6px;
	font-weight: bold;
	font-size: 14px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.solution-item.found {
	background: #f97d22;
	color: white;
}

.solution-item.missed {
	background: #f44336;
	color: white;
}

.solution-item .points {
	font-size: 11px;
	opacity: 0.9;
}
.start-screen {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 80vh;
}
.welcome-tiles {
	display: flex;
	gap: 15px;
	margin: 40px 0;
	flex-wrap: wrap;
	justify-content: center;
}
.welcome-tile {
	width: 80px;
	height: 80px;
	perspective: 1000px;
	cursor: default;
}
.welcome-tile .tile-inner {
	font-size: 32px;
	font-weight: bold;
}
.instructions {
	max-width: 500px;
	margin: 30px 0;
	padding: 20px;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 12px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	text-align: left;
}
.instructions h2 {
	color: #333;
	margin: 0 0 15px 0;
	text-align: center;
	font-size: 1.5em;
}
.instruction-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.instruction-list p {
	margin: 0;
	padding: 8px 0;
	color: #555;
	font-size: 16px;
	line-height: 1.4;
}
.instruction-list strong {
	color: #333;
}
.start-button {
	padding: 15px 30px;
	font-size: 20px;
	background: #f97d22;
	color: white;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	margin-top: 20px;
}
.start-button:hover {
	background: #e56a0f;
}
#newGameBtn {
	background: #2196f3;
	color: white;
	border: none;
	border-radius: 5px;
	font-weight: bold;
}
#newGameBtn:hover {
	background: #1976d2;
}
.game-screen {
	display: none;
}
.hidden {
	display: none !important;
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
	body {
		padding: 5px;
		font-size: 16px; /* Better base font size for mobile */
	}

	h1 {
		font-size: 1.8em !important;
		margin: 10px 0 !important;
	}

	/* Better button layout for mobile */
	.game-controls {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 8px;
		margin: 15px 0;
		max-width: 100%;
	}

	.game-controls button {
		min-height: 48px; /* iOS/Android recommended touch target */
		min-width: 48px;
		padding: 12px 16px;
		font-size: 14px;
		border-radius: 8px;
		flex: 1 1 auto;
		max-width: 150px;
	}

	/* Make submit button more prominent on mobile */
	#submitBtn {
		font-size: 16px;
		padding: 16px 24px;
		min-height: 56px; /* Larger touch target for primary action */
		flex: 2 1 auto; /* Take up more space */
		max-width: 200px;
		box-shadow: 0 6px 12px rgba(249, 125, 34, 0.4);
	}

	.tile {
		width: 70px;
		height: 70px;
		/* Enhanced touch feedback */
		transition: transform 0.2s ease, box-shadow 0.2s ease;
	}

	.tile:active {
		transform: scale(0.95);
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	}

	/* Better button styling for mobile */
	button {
		transition: all 0.2s ease;
		-webkit-tap-highlight-color: transparent;
		touch-action: manipulation;
	}

	button:active {
		transform: scale(0.98);
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	}

	.tile-face {
		font-size: 24px;
	}

	.tile-tray,
	.play-area {
		gap: 8px;
		margin: 15px 5px;
		margin-bottom: 15px;
		padding: 15px;
		padding-bottom: 65px;
		min-height: 110px;
		overflow-x: auto;
		overflow-y: hidden;
		justify-content: flex-start; /* Left-align tiles for better mobile UX */
		width: calc(100% - 10px);
		box-sizing: border-box;
		/* Add smooth scrolling for mobile */
		scroll-behavior: smooth;
		-webkit-overflow-scrolling: touch;
	}

	/* Show scroll hint on mobile */
	.tile-tray::after,
	.play-area::after {
		content: "";
		position: absolute;
		right: 0;
		top: 50%;
		transform: translateY(-50%);
		width: 20px;
		height: 100%;
		background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1));
		pointer-events: none;
		opacity: 0.5;
	}

	.tile-arrow {
		bottom: -25px;
		left: 50%;
		transform: translateX(-50%);
		border-left: 10px solid transparent;
		border-right: 10px solid transparent;
		border-top: 14px solid #f97d22;
	}

	/* Larger touch target for mobile */
	.tile-arrow::before {
		top: -25px;
		left: -25px;
		width: 50px;
		height: 50px;
	}

	.tile-preview {
		width: 22px;
		height: 22px;
		font-size: 13px;
		top: 2px;
		right: 2px;
	}

	#scoreboard {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto auto;
		gap: 10px;
		justify-content: center;
		font-size: 14px;
		margin: 10px 0;
		padding: 10px;
		background: rgba(0, 0, 0, 0.05);
		border-radius: 8px;
	}

	#scoreboard > div:nth-child(5) {
		grid-column: 1 / -1; /* Easy mode spans full width */
		justify-self: center;
	}

	.autocomplete-container {
		margin: 15px 10px;
		padding: 12px;
		max-width: 90%;
	}

	.autocomplete-title {
		font-size: 14px;
		margin-bottom: 8px;
	}

	.autocomplete-words {
		gap: 6px;
	}

	.autocomplete-word {
		padding: 5px 10px;
		font-size: 12px;
	}

	.played-words-section {
		margin: 15px 10px;
		padding: 12px;
		max-width: 90%;
	}

	.played-words-section h3 {
		font-size: 16px;
		margin-bottom: 8px;
	}

	.played-words-list {
		gap: 6px;
	}

	.played-word {
		padding: 5px 10px;
		font-size: 12px;
	}

	.played-word-points {
		font-size: 10px;
		padding: 1px 4px;
	}

	button {
		margin: 15px 10px;
		padding: 15px 25px;
		font-size: 18px;
		min-height: 50px;
	}

	.start-button {
		padding: 20px 35px;
		font-size: 24px;
	}

	.welcome-tile {
		width: 60px;
		height: 60px;
	}

	.welcome-tile .tile-inner {
		font-size: 24px;
	}

	.welcome-tiles {
		gap: 8px;
		margin: 20px 0;
	}

	.instructions {
		max-width: 90%;
		margin: 20px 0;
		padding: 15px;
	}

	.instructions h2 {
		font-size: 1.3em;
	}

	.instruction-list p {
		font-size: 15px;
	}

	#output {
		font-size: 18px;
		text-align: center;
		margin: 20px 10px;
	}

	/* Solutions Modal Mobile Styles */
	.solutions-content {
		padding: 16px;
		max-width: 95vw;
		max-height: 95vh;
	}

	.solutions-header h2 {
		font-size: 20px;
	}

	.solutions-stats {
		gap: 10px;
	}

	.stat {
		padding: 8px 12px;
		font-size: 14px;
		min-width: 80px;
	}

	.solutions-grid {
		grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
		gap: 6px;
	}

	.solution-item {
		padding: 6px 10px;
		font-size: 12px;
	}

	.solutions-section h3 {
		font-size: 16px;
		padding: 8px;
	}
}

/* Mobile landscape orientation */
@media screen and (max-width: 768px) and (orientation: landscape) {
	body {
		padding: 2px;
	}

	h1 {
		font-size: 1.4em !important;
		margin: 5px 0 !important;
	}

	.tile-tray,
	.play-area {
		margin: 8px 5px;
		padding: 10px;
		padding-bottom: 50px;
		min-height: 80px;
	}

	#scoreboard {
		grid-template-columns: repeat(3, 1fr);
		grid-template-rows: auto auto;
		gap: 8px;
		font-size: 12px;
		margin: 5px 0;
		padding: 8px;
	}

	#scoreboard > div:nth-child(4),
	#scoreboard > div:nth-child(5) {
		grid-column: span 1;
	}

	.game-controls {
		margin: 8px 0;
	}

	.game-controls button {
		min-height: 40px;
		padding: 8px 12px;
		font-size: 13px;
	}

	.instructions {
		margin: 8px 0;
		padding: 8px;
	}

	.instruction-list p {
		font-size: 13px;
		margin: 4px 0;
	}
}

/* Extra small screens (phones in portrait) */
@media screen and (max-width: 480px) {
	.tile {
		width: 55px;
		height: 55px;
	}

	.tile-face {
		font-size: 20px;
	}

	.tile-tray,
	.play-area {
		gap: 6px;
		margin: 10px 2px;
		margin-bottom: 10px;
		padding: 12px;
		padding-bottom: 70px;
		min-height: 100px;
		overflow-x: auto;
		overflow-y: hidden;
		justify-content: flex-start;
		width: calc(100% - 4px);
		box-sizing: border-box;
	}

	.game-controls {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		margin: 10px 0;
	}

	.game-controls button {
		min-height: 44px;
		padding: 10px 12px;
		font-size: 14px;
		grid-column: span 1;
	}

	.game-controls button.wide {
		grid-column: 1 / -1;
	}

	/* Enhanced submit button for small screens */
	#submitBtn {
		font-size: 15px;
		padding: 14px 20px;
		min-height: 52px;
		grid-column: 1 / -1; /* Always full width on small screens */
		background: linear-gradient(135deg, #f97d22, #e56a0f);
		box-shadow: 0 4px 12px rgba(249, 125, 34, 0.5);
	}

	.tile-arrow {
		bottom: -30px;
		left: 50%;
		transform: translateX(-50%);
		border-left: 12px solid transparent;
		border-right: 12px solid transparent;
		border-top: 16px solid #f97d22;
	}

	/* Even larger touch target for smaller screens */
	.tile-arrow::before {
		top: -30px;
		left: -30px;
		width: 60px;
		height: 60px;
	}

	.tile-preview {
		width: 20px;
		height: 20px;
		font-size: 12px;
	}

	.welcome-tile {
		width: 40px;
		height: 40px;
	}

	.welcome-tile .tile-inner {
		font-size: 18px;
	}

	.welcome-tiles {
		gap: 6px;
		margin: 15px 0;
	}

	.instructions {
		margin: 15px 0;
		padding: 12px;
	}

	.instructions h2 {
		font-size: 1.2em;
	}

	.instruction-list p {
		font-size: 14px;
	}

	#scoreboard {
		gap: 8px;
		font-size: 14px;
	}

	button {
		padding: 12px 18px;
		font-size: 16px;
		margin: 8px 4px;
	}

	.start-button {
		padding: 16px 25px;
		font-size: 18px;
	}
}

/* Very small screens (older phones) */
@media screen and (max-width: 360px) {
	.tile {
		width: 45px;
		height: 45px;
	}

	.tile-face {
		font-size: 18px;
	}

	.tile-tray,
	.play-area {
		gap: 4px;
		margin: 8px 1px;
		margin-bottom: 8px; /* Normal margin */
		padding: 10px; /* Increased padding for 360px drop area */
		padding-bottom: 75px; /* Space for 360px arrows within container */
		min-height: 90px; /* Increased height for 360px */
		overflow-x: auto;
		overflow-y: hidden; /* Prevent scrollbars */
		justify-content: center; /* Center tiles in fixed-width container */
		width: calc(100% - 2px); /* Full width minus margins */
		box-sizing: border-box;
	}

	.tile-arrow {
		bottom: -35px;
		left: 50%;
		transform: translateX(-50%);
		border-left: 14px solid transparent;
		border-right: 14px solid transparent;
		border-top: 18px solid #f97d22;
	}

	/* Maximum touch target for very small screens */
	.tile-arrow::before {
		top: -35px;
		left: -35px;
		width: 70px;
		height: 70px;
	}

	.tile-preview {
		width: 18px;
		height: 18px;
		font-size: 11px;
	}

	.welcome-tile {
		width: 35px;
		height: 35px;
	}

	.welcome-tile .tile-inner {
		font-size: 16px;
	}

	.welcome-tiles {
		gap: 4px;
		margin: 10px 0;
	}

	.instructions {
		margin: 10px 0;
		padding: 10px;
	}

	.instructions h2 {
		font-size: 1.1em;
	}

	.instruction-list p {
		font-size: 13px;
	}

	h1 {
		font-size: 1.5em !important;
	}

	#scoreboard {
		font-size: 12px;
		gap: 6px;
	}

	button {
		padding: 10px 15px;
		font-size: 14px;
		margin: 6px 3px;
	}

	/* Extra prominent submit button for very small screens */
	#submitBtn {
		font-size: 16px;
		padding: 16px 24px;
		min-height: 56px;
		margin: 10px 0;
		box-shadow: 0 6px 16px rgba(249, 125, 34, 0.6);
		border-width: 3px;
	}
}

/* Feedback Button */
.feedback-btn {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background-color: #007bff;
	color: white;
	border: none;
	border-radius: 25px;
	padding: 12px 20px;
	font-size: 14px;
	cursor: pointer;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	transition: all 0.3s ease;
	z-index: 1000;
}

.feedback-btn:hover {
	background-color: #0056b3;
	transform: translateY(-2px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Feedback Modal */
.feedback-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 2000;
}

.feedback-modal.hidden {
	display: none;
}

.feedback-content {
	background: white;
	border-radius: 12px;
	padding: 30px;
	max-width: 500px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feedback-close {
	position: absolute;
	top: 15px;
	right: 20px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #666;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.feedback-close:hover {
	color: #333;
	background-color: #f0f0f0;
	border-radius: 50%;
}

.feedback-content h2 {
	margin: 0 0 20px 0;
	color: #333;
	font-size: 24px;
}

.rating-section {
	margin-bottom: 20px;
}

.rating-section p {
	margin: 0 0 10px 0;
	font-weight: 500;
	color: #555;
}

.star-rating {
	display: flex;
	gap: 5px;
	margin-bottom: 15px;
}

.star {
	font-size: 32px;
	color: #ddd;
	cursor: pointer;
	transition: color 0.2s ease;
	user-select: none;
}

.star:hover,
.star.active {
	color: #ffc107;
}

.comment-section {
	margin-bottom: 25px;
}

.comment-section label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #555;
}

.comment-section textarea {
	width: 100%;
	padding: 12px;
	border: 2px solid #ddd;
	border-radius: 6px;
	font-family: inherit;
	font-size: 14px;
	resize: vertical;
	min-height: 80px;
	box-sizing: border-box;
}

.comment-section textarea:focus {
	outline: none;
	border-color: #007bff;
}

.feedback-buttons {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.feedback-buttons button {
	padding: 12px 24px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

#submitFeedbackBtn {
	background-color: #28a745;
	color: white;
}

#submitFeedbackBtn:hover:not(:disabled) {
	background-color: #218838;
}

#submitFeedbackBtn:disabled {
	background-color: #ccc;
	cursor: not-allowed;
}

#cancelFeedbackBtn {
	background-color: #6c757d;
	color: white;
}

#cancelFeedbackBtn:hover {
	background-color: #5a6268;
}

.feedback-message {
	margin-top: 15px;
	padding: 12px;
	border-radius: 6px;
	text-align: center;
	font-weight: 500;
}

.feedback-message.hidden {
	display: none;
}

.feedback-message.success {
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.feedback-message.error {
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Mobile responsiveness for feedback modal */
@media (max-width: 600px) {
	.feedback-content {
		padding: 20px;
		margin: 10px;
		width: calc(100% - 20px);
	}

	.feedback-btn {
		bottom: 15px;
		right: 15px;
		padding: 10px 16px;
		font-size: 13px;
	}

	.star {
		font-size: 28px;
	}

	.feedback-buttons {
		flex-direction: column;
	}

	.feedback-buttons button {
		width: 100%;
	}
}

/* =====================================================
   SCORE HISTORY MODAL STYLES
   ===================================================== */

/* Score History Button */
.score-history-btn {
	position: fixed;
	bottom: 80px; /* Position above feedback button */
	right: 20px;
	background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
	color: white;
	border: none;
	border-radius: 25px;
	padding: 12px 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 1000;
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-history-btn:hover {
	background: linear-gradient(135deg, #218838 0%, #1ba085 100%);
	transform: translateY(-3px) scale(1.02);
	box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.score-history-btn:active {
	transform: translateY(-1px) scale(0.98);
}

/* Score History Modal */
.score-history-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(8px);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 2000;
	animation: fadeIn 0.3s ease-out;
}

.score-history-modal.hidden {
	display: none;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		backdrop-filter: blur(0px);
	}
	to {
		opacity: 1;
		backdrop-filter: blur(8px);
	}
}

.score-history-content {
	background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
	border-radius: 20px;
	padding: 35px;
	max-width: 650px;
	width: 92%;
	max-height: 85vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.1),
		inset 0 1px 0 rgba(255, 255, 255, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.2);
	animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.score-history-close {
	position: absolute;
	top: 20px;
	right: 25px;
	background: rgba(0, 0, 0, 0.05);
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #666;
	padding: 8px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.2s ease;
}

.score-history-close:hover {
	background: rgba(220, 53, 69, 0.1);
	color: #dc3545;
	transform: rotate(90deg);
}

.score-history-content h2 {
	margin: 0 0 30px 0;
	color: #2c3e50;
	font-size: 28px;
	font-weight: 700;
	text-align: center;
	background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* Statistics Section */
.score-history-stats {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 16px;
	padding: 25px;
	margin-bottom: 30px;
	position: relative;
	overflow: hidden;
}

.score-history-stats::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		135deg,
		rgba(255, 255, 255, 0.1) 0%,
		rgba(255, 255, 255, 0.05) 100%
	);
	pointer-events: none;
}

.score-history-stats h3 {
	margin: 0 0 20px 0;
	color: white;
	font-size: 20px;
	font-weight: 600;
	text-align: center;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 18px;
	position: relative;
	z-index: 1;
}

.stat-item {
	text-align: center;
	background: rgba(255, 255, 255, 0.95);
	padding: 18px 12px;
	border-radius: 12px;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.05);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-item:hover {
	transform: translateY(-5px) scale(1.02);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.08);
}

.stat-label {
	display: block;
	font-size: 11px;
	color: #6c757d;
	margin-bottom: 8px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.stat-value {
	display: block;
	font-size: 24px;
	font-weight: 800;
	background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	line-height: 1.2;
}

/* Score History List */
.score-history-list {
	max-height: 350px;
	overflow-y: auto;
	background: white;
	border-radius: 12px;
	border: 1px solid rgba(0, 0, 0, 0.05);
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.score-entry {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 20px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	transition: all 0.2s ease;
	position: relative;
}

.score-entry::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 4px;
	background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
	transform: scaleX(0);
	transition: transform 0.3s ease;
}

.score-entry:hover {
	background: linear-gradient(
		135deg,
		rgba(40, 167, 69, 0.03) 0%,
		rgba(32, 201, 151, 0.03) 100%
	);
	transform: translateX(8px);
}

.score-entry:hover::before {
	transform: scaleX(1);
}

.score-entry:last-child {
	border-bottom: none;
}

.score-date {
	font-weight: 700;
	color: #2c3e50;
	min-width: 85px;
	font-size: 15px;
	position: relative;
}

.score-details {
	flex: 1;
	margin: 0 20px;
}

.score-info {
	font-size: 14px;
	color: #6c757d;
	margin: 3px 0;
	font-weight: 500;
}

.score-status {
	font-size: 11px;
	padding: 4px 10px;
	border-radius: 20px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: inline-block;
	margin-top: 4px;
}

.status-completed {
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	color: #155724;
	border: 1px solid #b8dabd;
}

.status-gave-up {
	background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
	color: #856404;
	border: 1px solid #f0d980;
}

.status-auto-ended {
	background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
	color: #721c24;
	border: 1px solid #e8a1aa;
}

.status-ended {
	background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
	color: #383d41;
	border: 1px solid #c6c8ca;
}

.status-in-progress {
	background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
	color: #0c5460;
	border: 1px solid #abd5d8;
}

.score-points {
	font-size: 22px;
	font-weight: 800;
	background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	min-width: 70px;
	text-align: right;
	position: relative;
}

.score-points::after {
	content: "pts";
	font-size: 10px;
	color: #6c757d;
	font-weight: 500;
	position: absolute;
	bottom: -2px;
	right: 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Empty State */
.score-history-empty {
	text-align: center;
	padding: 60px 20px;
	color: #6c757d;
	font-style: italic;
	font-size: 16px;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border-radius: 12px;
	border: 2px dashed #dee2e6;
}

.score-history-empty::before {
	content: "📊";
	display: block;
	font-size: 48px;
	margin-bottom: 15px;
	opacity: 0.5;
}

/* Action Buttons */
.score-history-buttons {
	margin-top: 25px;
	text-align: center;
}

.score-history-buttons button {
	background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: 25px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.score-history-buttons button:hover {
	background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Mobile responsiveness for score history modal */
@media (max-width: 600px) {
	.score-history-content {
		padding: 25px 20px;
		margin: 15px;
		width: calc(100% - 30px);
		max-height: 90vh;
		border-radius: 16px;
	}

	.score-history-content h2 {
		font-size: 24px;
		margin-bottom: 25px;
	}

	.score-history-btn {
		bottom: 75px;
		right: 15px;
		padding: 10px 16px;
		font-size: 13px;
		border-radius: 20px;
	}

	.score-history-stats {
		padding: 20px;
		margin-bottom: 25px;
	}

	.stats-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.stat-item {
		padding: 14px 8px;
	}

	.stat-value {
		font-size: 20px;
	}

	.stat-label {
		font-size: 10px;
	}

	.score-entry {
		padding: 16px;
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.score-entry:hover {
		transform: translateX(4px);
	}

	.score-date {
		min-width: auto;
		font-size: 16px;
		font-weight: 800;
	}

	.score-details {
		margin: 0;
		width: 100%;
	}

	.score-points {
		align-self: flex-end;
		font-size: 20px;
		min-width: auto;
	}

	.score-points::after {
		font-size: 9px;
	}

	.score-status {
		font-size: 10px;
		padding: 3px 8px;
	}

	.score-history-empty {
		padding: 40px 15px;
	}

	.score-history-empty::before {
		font-size: 36px;
	}
}

/* Beta Banner */
.beta-banner {
	position: fixed;
	top: 20px;
	right: 20px;
	background: linear-gradient(135deg, #f97d22, #e56a0f);
	color: white;
	font-weight: bold;
	font-size: 14px;
	padding: 8px 16px;
	border-radius: 20px;
	box-shadow: 0 4px 12px rgba(249, 125, 34, 0.3);
	z-index: 9999;
	letter-spacing: 1px;
	animation: betaGlow 3s ease-in-out infinite;
	user-select: none;
	pointer-events: none;
}

@keyframes betaGlow {
	0%,
	100% {
		box-shadow: 0 4px 12px rgba(249, 125, 34, 0.3);
	}
	50% {
		box-shadow: 0 4px 20px rgba(249, 125, 34, 0.6),
			0 0 30px rgba(249, 125, 34, 0.3);
	}
}

/* Mobile responsiveness for beta banner */
@media (max-width: 768px) {
	.beta-banner {
		top: 15px;
		right: 15px;
		font-size: 12px;
		padding: 6px 12px;
	}
}

@media (max-width: 480px) {
	.beta-banner {
		top: 10px;
		right: 10px;
		font-size: 11px;
		padding: 5px 10px;
	}
}

@media (max-width: 360px) {
	.beta-banner {
		top: 8px;
		right: 8px;
		font-size: 10px;
		padding: 4px 8px;
	}
}

/* New styles for drag-and-drop interface */
#dragDropInterface {
	width: 100%;
	max-width: 600px;
}

.play-rack-container,
.holding-area-container {
	margin-bottom: 15px;
}

.container-title {
	font-size: 14px;
	color: #666;
	margin-bottom: 5px;
	text-align: left;
	padding-left: 10px;
}

.tile-container {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	background-color: #f0f0f0;
	border: 2px dashed #ccc;
	min-height: 80px;
	padding: 10px;
	border-radius: 10px;
}

/* Styling for the placeholder when dragging */
.tile-placeholder {
	width: 60px;
	height: 60px;
	background-color: rgba(0, 0, 0, 0.1);
	border-radius: 5px;
	border: 2px dashed #888;
}

.tile-tray::after,
.play-area::after {
	content: "Drop tiles here";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 100%;
	background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.1));
	pointer-events: none;
	opacity: 0.5;
}

/* ========================================
   ADVERTISEMENT STYLES
   ======================================== */

.advertisement-section {
	width: 100%;
	background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	margin: 30px auto;
	max-width: 600px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ad-container {
	padding: 16px 20px;
	text-align: center;
}

.ad-label {
	font-size: 11px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
	font-weight: 500;
}

.ad-content {
	margin-bottom: 8px;
}

.ad-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.ad-placeholder p {
	margin: 0;
	font-size: 14px;
	color: #444;
	line-height: 1.4;
}

.ad-link {
	color: #f97d22;
	text-decoration: none;
	font-weight: 600;
	font-size: 13px;
	padding: 6px 12px;
	border-radius: 4px;
	border: 1px solid #f97d22;
	transition: all 0.2s ease;
	display: inline-block;
}

.ad-link:hover {
	background-color: #f97d22;
	color: white;
	text-decoration: none;
}

.ad-disclosure {
	font-size: 10px;
	color: #999;
	font-style: italic;
	margin-top: 6px;
}

/* Mobile responsiveness for ads */
@media (max-width: 768px) {
	.advertisement-section {
		margin: 20px 10px;
		border-radius: 6px;
	}

	.ad-container {
		padding: 12px 16px;
	}

	.ad-placeholder {
		gap: 6px;
	}

	.ad-placeholder p {
		font-size: 13px;
	}

	.ad-link {
		font-size: 12px;
		padding: 5px 10px;
	}
}

/* ========================================
   CREDITS & FOOTER STYLES
   ======================================== */

.game-credits {
	width: 100%;
	background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
	border-top: 1px solid #ddd;
	margin-top: 40px;
	padding: 20px 0;
	text-align: center;
	position: relative;
	z-index: 1;
}

.credits-content {
	max-width: 800px;
	margin: 0 auto;
	padding: 0 20px;
}

.credits-content p {
	margin: 8px 0;
	line-height: 1.4;
}

.copyright {
	font-size: 16px;
	font-weight: 500;
	color: #333;
	margin-bottom: 12px !important;
}

.developer-info {
	font-size: 14px;
	color: #555;
}

.developer-info a {
	color: #f97d22;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.developer-info a:hover {
	color: #e56a0f;
	text-decoration: underline;
}

/* Support Section Styles */
.support-section {
	margin: 20px 0 25px 0;
	padding: 20px;
	background: linear-gradient(135deg, #ff9a56, #ff6b35);
	border-radius: 12px;
	text-align: center;
	box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.support-text {
	font-size: 16px;
	color: white;
	margin: 0 0 15px 0;
	font-weight: 500;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.support-link {
	display: inline-block;
	background: white;
	color: #ff6b35;
	text-decoration: none;
	padding: 12px 24px;
	border-radius: 25px;
	font-weight: bold;
	font-size: 16px;
	transition: all 0.3s ease;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	border: 2px solid transparent;
}

.support-link:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	background: #fff8f6;
	border-color: rgba(255, 255, 255, 0.5);
}

.support-link:active {
	transform: translateY(0);
}

.support-link i {
	margin-right: 8px;
	font-size: 18px;
}

/* Mobile responsive */
@media (max-width: 480px) {
	.support-section {
		margin: 15px 0 20px 0;
		padding: 15px;
	}

	.support-text {
		font-size: 14px;
	}

	.support-link {
		padding: 10px 20px;
		font-size: 14px;
	}
}

/* Enhanced X (Twitter) Share Button Styling */
.share-x-btn {
	background: linear-gradient(135deg, #1da1f2, #0d8bd9);
	color: white;
	border: none;
	padding: 15px 30px;
	border-radius: 50px;
	font-size: 18px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 20px auto;
	min-width: 250px;
	position: relative;
	overflow: hidden;
}

.share-x-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 25px rgba(29, 161, 242, 0.4);
	background: linear-gradient(135deg, #0d8bd9, #0a7bc4);
}

.share-x-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 10px rgba(29, 161, 242, 0.3);
}

.share-x-btn i {
	font-size: 20px;
	margin-right: 5px;
}

/* Pulse animation for extra prominence */
.share-x-btn::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		135deg,
		rgba(255, 255, 255, 0.1),
		rgba(255, 255, 255, 0.05)
	);
	border-radius: 50px;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.share-x-btn:hover::before {
	opacity: 1;
}

/* Mobile responsive for share button */
@media (max-width: 480px) {
	.share-x-btn {
		font-size: 16px;
		padding: 12px 25px;
		min-width: 200px;
	}
}

/* Main Share Results Button Styling */
#shareResultsBtn {
	background: linear-gradient(135deg, #1da1f2, #0d8bd9);
	color: white;
	border: none;
	padding: 12px 25px;
	border-radius: 25px;
	font-size: 16px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 10px 5px;
	min-width: 180px;
	position: relative;
	overflow: hidden;
}

#shareResultsBtn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 25px rgba(29, 161, 242, 0.4);
	background: linear-gradient(135deg, #0d8bd9, #0a7bc4);
}

#shareResultsBtn:active {
	transform: translateY(0);
	box-shadow: 0 2px 10px rgba(29, 161, 242, 0.3);
}

#shareResultsBtn:disabled {
	background: #ccc;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* Add subtle animation */
#shareResultsBtn::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		135deg,
		rgba(255, 255, 255, 0.1),
		rgba(255, 255, 255, 0.05)
	);
	border-radius: 25px;
	opacity: 0;
	transition: opacity 0.3s ease;
}

#shareResultsBtn:hover::before {
	opacity: 1;
}

.tech-credits {
	font-size: 12px;
	color: #777;
	font-style: italic;
	margin-top: 8px;
}

.version-info {
	font-size: 11px;
	color: #999;
	margin-top: 6px;
	font-family: "Courier New", monospace;
}

/* Social Media Sharing Styles */
.social-sharing {
	margin: 15px 0 20px 0;
	padding: 15px;
	background: rgba(249, 125, 34, 0.1);
	border-radius: 8px;
	border: 1px solid rgba(249, 125, 34, 0.2);
}

.share-text {
	font-size: 14px;
	color: #555;
	margin: 0 0 10px 0 !important;
	font-weight: 500;
}

.social-icons {
	display: flex;
	justify-content: center;
	gap: 15px;
	flex-wrap: wrap;
}

.social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: white;
	border: 2px solid #f97d22;
	border-radius: 50%;
	text-decoration: none;
	font-size: 18px;
	transition: all 0.3s ease;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-icon:hover {
	background: #f97d22;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-icon:active {
	transform: translateY(0);
}

/* Individual social platform styling */
.social-icon.twitter:hover {
	background: #1da1f2;
	border-color: #1da1f2;
}

.social-icon.facebook:hover {
	background: #1877f2;
	border-color: #1877f2;
}

.social-icon.linkedin:hover {
	background: #0077b5;
	border-color: #0077b5;
}

.social-icon.reddit:hover {
	background: #ff4500;
	border-color: #ff4500;
}

.social-icon.copy:hover {
	background: #28a745;
	border-color: #28a745;
}

/* Mobile responsive credits */
@media (max-width: 768px) {
	.game-credits {
		padding: 15px 0;
		margin-top: 30px;
	}

	.credits-content {
		padding: 0 15px;
	}

	.copyright {
		font-size: 14px;
	}

	.developer-info {
		font-size: 13px;
	}

	.tech-credits {
		font-size: 11px;
	}

	.version-info {
		font-size: 10px;
	}

	/* Social sharing mobile styles */
	.social-sharing {
		margin: 10px 0 15px 0;
		padding: 12px;
	}

	.share-text {
		font-size: 13px;
	}

	.social-icons {
		gap: 12px;
	}

	.social-icon {
		width: 36px;
		height: 36px;
		font-size: 16px;
	}
}

/* Dark mode friendly */
@media (prefers-color-scheme: dark) {
	.game-credits {
		background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
		border-top-color: #444;
	}

	.copyright {
		color: #f0f0f0;
	}

	.developer-info {
		color: #ccc;
	}

	.tech-credits {
		color: #aaa;
	}

	.version-info {
		color: #888;
	}
}
