/* Bootstrap overrides and custom styles */
:root {
	--primary-color: #ff7518;
	--secondary-color: #ff9547;
	--accent-color: #ffb366;
	--wood-light: #e6c794;
	--wood-medium: #d4a574;
	--wood-dark: #c19a5a;
	--wood-darker: #a67c52;
	--wood-border: #8b5a2b;
	--wood-frame: #6b4521;
	--background-color: #f5f1e8;
	--text-color: #4a3728;
	--card-bg: #f2e6d3;
	--metal-light: #c0c0c0;
	--metal-dark: #808080;
	--shadow: 0 8px 16px rgba(107, 69, 33, 0.4);
	--wood-shadow: inset 0 3px 6px rgba(107, 69, 33, 0.2), 0 12px 24px rgba(107, 69, 33, 0.3);
	--deep-shadow: inset 0 -3px 6px rgba(107, 69, 33, 0.3), inset 0 3px 6px rgba(255, 255, 255, 0.2);
	--button-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3), inset 0 -3px 6px rgba(107, 69, 33, 0.4), 0 6px 12px rgba(107, 69, 33, 0.3);
}

[data-theme="dark"] {
	--background-color: #2c1810;
	--text-color: #f5f1e8;
	--card-bg: #3d2818;
	--wood-light: #8b5a2b;
	--wood-medium: #7a4f26;
	--wood-dark: #6b4521;
	--wood-frame: #5a3a1c;
	--shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
	--wood-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.5);
	--deep-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.3), inset 0 2px 4px rgba(255, 255, 255, 0.05);
}

body {
	background: linear-gradient(135deg, var(--wood-darker) 0%, var(--wood-frame) 100%);
	color: var(--text-color);
	font-family: 'Rockwell', 'Times New Roman', serif;
	min-height: 100vh;
	margin: 0;
	padding: 0;
	overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--wood-light), var(--wood-medium));
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
	opacity: 0;
	pointer-events: none;
}

.loading-cat {
	width: 200px;
	height: 200px;
	background: var(--primary-color);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 5rem;
	color: white;
	margin-bottom: 2rem;
	animation: bounce 2s infinite;
	box-shadow: var(--wood-shadow);
	border: 8px solid var(--wood-border);
}

.loading-text {
	color: white;
	font-size: 2rem;
	font-weight: bold;
	margin-bottom: 1rem;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.loading-subtitle {
	color: rgba(255, 255, 255, 0.9);
	font-size: 1.2rem;
	margin-bottom: 2rem;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.loading-spinner {
	width: 60px;
	height: 60px;
	border: 6px solid rgba(255, 255, 255, 0.3);
	border-top: 6px solid white;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes bounce {
	0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
	40% { transform: translateY(-20px); }
	60% { transform: translateY(-10px); }
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Common Screen Layout */
.screen {
	max-width: 414px;
	margin: 0 auto;
	min-height: 100vh;
	background: var(--card-bg);
	background-image:
	repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(166, 124, 82, 0.08) 1px, rgba(166, 124, 82, 0.08) 2px),
	repeating-linear-gradient(90deg, transparent, transparent 15px, rgba(139, 90, 43, 0.05) 15px, rgba(139, 90, 43, 0.05) 16px);
	border-left: 8px solid var(--wood-frame);
	border-right: 8px solid var(--wood-frame);
	box-shadow: var(--shadow);
	position: relative;
}

/* Start Screen */
.start-screen {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	text-align: center;
}

.sad-cat {
	width: 200px;
	height: 200px;
	background: var(--primary-color);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 6rem;
	color: white;
	margin: 2rem 0;
	border: 8px solid var(--wood-frame);
	box-shadow: var(--wood-shadow);
	filter: grayscale(0.5) brightness(0.7);
	animation: sadShake 3s infinite;
	position: relative;
}

.happy-cat {
	width: 200px;
	height: 200px;
	background: var(--primary-color);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 6rem;
	color: white;
	margin: 2rem 0;
	border: 8px solid var(--wood-frame);
	box-shadow: var(--wood-shadow);
	filter: brightness(1.2) saturate(1.3);
	animation: happyBounce 2s infinite;
	position: relative;
}

@keyframes sadShake {
	0%, 50%, 100% { transform: translateX(0); }
	25% { transform: translateX(-3px); }
	75% { transform: translateX(3px); }
}

@keyframes happyBounce {
	0%, 50%, 100% { transform: translateY(0) scale(1); }
	25% { transform: translateY(-15px) scale(1.05); }
}

.speech-bubble {
	background: linear-gradient(135deg, var(--wood-light), var(--wood-medium));
	background-image:
	repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(139, 90, 43, 0.1) 1px, rgba(139, 90, 43, 0.1) 2px),
	repeating-linear-gradient(0deg, transparent, transparent 6px, rgba(166, 124, 82, 0.12) 6px, rgba(166, 124, 82, 0.12) 7px);
	border: 6px solid var(--wood-frame);
	border-radius: 20px;
	padding: 1.5rem;
	margin: 1rem 0;
	max-width: 300px;
	box-shadow: var(--wood-shadow);
	position: relative;
	animation: bubbleFloat 3s ease-in-out infinite;
}

.speech-bubble::before {
	content: '';
	position: absolute;
	top: 4px;
	left: 4px;
	right: 4px;
	bottom: 4px;
	border: 3px solid var(--wood-border);
	border-radius: 12px;
	pointer-events: none;
	box-shadow: var(--deep-shadow);
}

.speech-bubble::after {
	content: '';
	position: absolute;
	bottom: -20px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 0;
	border-left: 20px solid transparent;
	border-right: 20px solid transparent;
	border-top: 20px solid var(--wood-frame);
}

.speech-bubble p {
	margin: 0;
	font-size: 1.2rem;
	font-weight: bold;
	color: var(--text-color);
	text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
	position: relative;
	z-index: 1;
}

@keyframes bubbleFloat {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-5px); }
}

.wooden-button {
	background: linear-gradient(145deg, var(--wood-light) 0%, var(--wood-medium) 50%, var(--wood-dark) 100%);
	background-image:
	repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(107, 69, 33, 0.1) 2px, rgba(107, 69, 33, 0.1) 3px),
	repeating-linear-gradient(15deg, transparent, transparent 8px, rgba(166, 124, 82, 0.12) 8px, rgba(166, 124, 82, 0.12) 10px);
	border: 4px solid var(--wood-frame);
	border-radius: 16px;
	padding: 1.5rem 3rem;
	font-size: 1.5rem;
	font-weight: bold;
	color: var(--text-color);
	cursor: pointer;
	transition: all 0.2s ease;
	text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6), 0 0 8px rgba(255, 255, 255, 0.3);
	box-shadow: var(--button-shadow);
	position: relative;
	margin: 1rem;
	display: inline-block;
	text-decoration: none;
}

.wooden-button::before {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	right: 3px;
	bottom: 3px;
	border: 2px solid var(--wood-border);
	border-radius: 10px;
	pointer-events: none;
	box-shadow: inset 0 -2px 4px rgba(107, 69, 33, 0.2), inset 0 2px 4px rgba(255, 255, 255, 0.15);
}

.wooden-button::after {
	content: '';
	position: absolute;
	top: 8px;
	right: 8px;
	width: 8px;
	height: 8px;
	background: radial-gradient(circle, var(--metal-light) 30%, var(--metal-dark) 70%);
	border-radius: 50%;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(255, 255, 255, 0.2);
}

.wooden-button:hover {
	transform: translateY(-2px);
	box-shadow:
	inset 0 3px 6px rgba(255, 255, 255, 0.4),
	inset 0 -4px 8px rgba(107, 69, 33, 0.5),
	0 8px 20px rgba(107, 69, 33, 0.4);
	filter: brightness(1.05);
}

.wooden-button:active {
	transform: translateY(1px);
	box-shadow:
	inset 0 1px 3px rgba(255, 255, 255, 0.2),
	inset 0 -2px 4px rgba(107, 69, 33, 0.6),
	0 4px 8px rgba(107, 69, 33, 0.2);
	filter: brightness(0.95);
}

/* Stats Bar */
.stats-bar {
	background: linear-gradient(135deg, var(--wood-light), var(--wood-medium));
	background-image:
	repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(107, 69, 33, 0.15) 2px, rgba(107, 69, 33, 0.15) 3px),
	repeating-linear-gradient(15deg, transparent, transparent 10px, rgba(166, 124, 82, 0.1) 10px, rgba(166, 124, 82, 0.1) 12px);
	border-bottom: 4px solid var(--wood-frame);
	padding: 1rem;
	display: flex;
	justify-content: space-between;
	gap: 0.8rem;
	align-items: center;
	box-shadow: var(--wood-shadow);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	position: relative;
	overflow-x: auto;
	overflow-y: hidden;
	white-space: nowrap;
	scrollbar-width: thin;
	scrollbar-color: var(--wood-frame) transparent;
}

.stats-bar::-webkit-scrollbar {
	height: 6px;
}

.stats-bar::-webkit-scrollbar-track {
	background: rgba(107, 69, 33, 0.2);
	border-radius: 3px;
}

.stats-bar::-webkit-scrollbar-thumb {
	background: var(--wood-frame);
	border-radius: 3px;
}

.stats-bar::-webkit-scrollbar-thumb:hover {
	background: var(--wood-border);
}


.stat-divider {
	width: 2px;
	height: 40px;
	background: linear-gradient(to bottom, transparent, var(--wood-frame), transparent);
	margin: 0;
	opacity: 0.8;
}

.stat-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: white;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
	flex-shrink: 0;
	min-width: max-content;
}

[data-theme="light"] .stat-item {
	color: var(--text-color);
	text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.stat-icon {
	font-size: 1.5rem;
	color: var(--primary-color);
	text-shadow: 0 0 8px rgba(255, 117, 24, 0.6);
}

.stat-info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.stat-button {
	background: none;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	border-radius: 12px;
	padding: 0.5rem;
	color: white;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.stat-button:hover {
	background: rgba(255, 255, 255, 0.1);
	transform: scale(1.05);
}


.stat-value {
	font-size: 1.5rem;
	font-weight: bold;
}

.coins-value {
	color: #ffd700;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 215, 0, 0.5);
}

.score-value {
	color: #ffeb3b;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(255, 235, 59, 0.4);
}

.streak-value {
	color: #ff5722;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(255, 87, 34, 0.6);
}

.stat-label {
	font-size: 0.9rem;
	opacity: 0.9;
}

/* Satiety Bar */
.satiety-stat {
	position: relative;
}

.satiety-container {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.satiety-background {
	width: 50px;
	height: 6px;
	background: rgba(0, 0, 0, 0.3);
	border-radius: 3px;
	border: 1px solid var(--wood-frame);
	overflow: hidden;
	margin-top: -10px;
}

.satiety-bar {
	height: 100%;
	border-radius: 3px;
	transition: width 0.5s ease, background-color 0.3s ease;
	width: 50%;
}

.satiety-bar.low {
	background: linear-gradient(90deg, #ff4444, #cc0000);
	box-shadow: 0 0 6px rgba(255, 68, 68, 0.5);
}

.satiety-bar.medium {
	background: linear-gradient(90deg, #ffa500, #ff8c00);
	box-shadow: 0 0 6px rgba(255, 165, 0, 0.5);
}

.satiety-bar.high {
	background: linear-gradient(90deg, #4caf50, #2e7d32);
	box-shadow: 0 0 6px rgba(76, 175, 80, 0.5);
}

/* Stat Animations */
@keyframes coinBounce {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.2); }
}

@keyframes scoreGlow {
	0%, 100% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(255, 235, 59, 0.4); }
	50% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 235, 59, 0.8); }
}

@keyframes streakFlame {
	0%, 100% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(255, 87, 34, 0.6); }
	50% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 87, 34, 1); }
}

.coins-value.animate { animation: coinBounce 0.6s ease; }
.score-value.animate { animation: scoreGlow 0.8s ease; }
.streak-value.animate { animation: streakFlame 1s ease; }

/* Mini-Game Screen */
.mini-game-screen {
	padding: 2rem;
}

.question-container {
	background: linear-gradient(135deg, var(--wood-light), var(--wood-medium));
	background-image:
	repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(139, 90, 43, 0.1) 2px, rgba(139, 90, 43, 0.1) 3px);
	border: 6px solid var(--wood-frame);
	border-radius: 20px;
	padding: 2rem;
	margin: 2rem 0;
	box-shadow: var(--wood-shadow);
	position: relative;
}

.question-container::before {
	content: '';
	position: absolute;
	top: 4px;
	left: 4px;
	right: 4px;
	bottom: 4px;
	border: 2px solid var(--wood-border);
	border-radius: 12px;
	pointer-events: none;
}

.question-text {
	color: var(--text-color);
	font-size: 1.3rem;
	font-weight: bold;
	text-align: center;
	margin-bottom: 2rem;
	position: relative;
	z-index: 1;
}

.question-number {
	color: var(--text-color);
	font-size: 1.1rem;
	text-align: center;
	margin-bottom: 1rem;
	opacity: 0.8;
}

.answers-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.answer-option {
	background: linear-gradient(145deg, var(--wood-light) 0%, var(--wood-medium) 50%, var(--wood-dark) 100%);
	background-image:
	repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(107, 69, 33, 0.08) 2px, rgba(107, 69, 33, 0.08) 3px),
	repeating-linear-gradient(15deg, transparent, transparent 10px, rgba(166, 124, 82, 0.06) 10px, rgba(166, 124, 82, 0.06) 12px);
	border: 3px solid var(--wood-frame);
	border-radius: 14px;
	padding: 1.2rem;
	font-size: 1.1rem;
	font-weight: bold;
	color: var(--text-color);
	cursor: pointer;
	transition: all 0.2s ease;
	text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.4);
	box-shadow: var(--button-shadow);
	position: relative;
	text-align: center;
	display: block;
	width: 100%;
	text-decoration: none;
}

.answer-option::before {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	right: 2px;
	bottom: 2px;
	border: 2px solid var(--wood-border);
	border-radius: 10px;
	pointer-events: none;
	box-shadow: inset 0 -2px 4px rgba(107, 69, 33, 0.15), inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.answer-option:hover {
	transform: translateY(-2px);
	box-shadow:
	inset 0 3px 6px rgba(255, 255, 255, 0.4),
	inset 0 -4px 8px rgba(107, 69, 33, 0.4),
	0 8px 16px rgba(107, 69, 33, 0.3);
	filter: brightness(1.05);
}

.answer-option.correct {
	background: linear-gradient(135deg, #90EE90, #32CD32);
	color: #1a5a1a;
	animation: correctPulse 0.5s ease;
}

.answer-option.incorrect {
	background: linear-gradient(135deg, #FFB6C1, #DC143C);
	color: #8b0000;
	animation: shake 0.5s ease;
}

.answer-option.disabled {
	pointer-events: none;
	opacity: 0.6;
}

@keyframes correctPulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.05); }
	100% { transform: scale(1); }
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-5px); }
	75% { transform: translateX(5px); }
}

/* Match Pairs Game */
.pairs-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin: 2rem 0;
}

.pairs-column {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.pair-item {
	background: linear-gradient(135deg, var(--wood-light), var(--wood-medium));
	border: 4px solid var(--wood-frame);
	border-radius: 12px;
	padding: 1rem;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s ease;
	font-weight: bold;
	color: var(--text-color);
}

.pair-item:hover {
	transform: scale(1.05);
}

.pair-item.selected {
	background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
	color: white;
	transform: scale(1.1);
}

.pair-item.matched {
	background: linear-gradient(135deg, #90EE90, #32CD32);
	color: #1a5a1a;
	pointer-events: none;
	opacity: 0.8;
}

/* Modal */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	padding: 1rem;
}

.modal-content {
	background: var(--wood-light);
	background-image:
	repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(139, 90, 43, 0.1) 2px, rgba(139, 90, 43, 0.1) 3px);
	border: 8px solid var(--wood-frame);
	border-radius: 25px;
	padding: 1rem;
	text-align: center;
	box-shadow: var(--wood-shadow);
	max-width: 350px;
	max-height: 80vh;
	width: 100%;
	position: relative;
	animation: modalSlideIn 0.5s ease-out;
	color: var(--text-color);
	display: flex;
	flex-direction: column;
}

.modal-content::before {
	content: '';
	position: absolute;
	top: 4px;
	left: 4px;
	right: 4px;
	bottom: 4px;
	border: 4px solid var(--wood-border);
	border-radius: 15px;
	pointer-events: none;
}

.modal-inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow-y: hidden;
	max-height: 70%;
}

.modal-title {
	font-size: 1.6rem;
	font-weight: bold;
	margin-bottom: 1rem;
	flex-shrink: 0;
}

.modal-message {
	font-size: 1.2rem;
	margin-bottom: 2rem;
	flex: 1;
	overflow-y: auto;
	text-align: left;
	padding-right: 0.5rem;
}

.modal-inner .wooden-button {
	flex-shrink: 0;
	margin-top: auto;
}

.modal-message::-webkit-scrollbar {
	width: 6px;
}

.modal-message::-webkit-scrollbar-track {
	background: rgba(107, 69, 33, 0.2);
	border-radius: 3px;
}

.modal-message::-webkit-scrollbar-thumb {
	background: var(--wood-frame);
	border-radius: 3px;
}

.modal-message::-webkit-scrollbar-thumb:hover {
	background: var(--wood-border);
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: scale(0.7) translateY(-50px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

/* Main App Layout */
.main-app {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	overflow: visible;
}

.main-content {
	flex: 1;
	padding: 1rem;
	padding-bottom: 80px;
}

/* Bottom Navigation */
.bottom-nav {
	position: fixed;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	max-width: 414px;
	background: linear-gradient(135deg, var(--wood-light), var(--wood-medium));
	background-image:
	repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(107, 69, 33, 0.15) 2px, rgba(107, 69, 33, 0.15) 3px),
	repeating-linear-gradient(0deg, transparent, transparent 8px, rgba(166, 124, 82, 0.1) 8px, rgba(166, 124, 82, 0.1) 10px);
	border-top: 4px solid var(--wood-frame);
	border-left: 8px solid var(--wood-frame);
	border-right: 8px solid var(--wood-frame);
	padding: 0.8rem 0;
	box-shadow: 
	0 -12px 24px rgba(107, 69, 33, 0.4),
	inset 0 2px 4px rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	overflow: visible;
}


.nav-items {
	display: flex;
	justify-content: space-around;
	align-items: center;
	width: 100%;
	position: relative;
	gap: 0.5rem;
	overflow: visible;
}

.nav-group {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	overflow: visible;
}

.nav-group:not(:last-child)::after {
	content: '';
	position: absolute;
	right: -0.25rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1px;
	height: 40px;
	background: linear-gradient(to bottom, transparent, var(--wood-frame), transparent);
}

.nav-item {
	text-align: center;
	padding: 0.5rem;
	cursor: pointer;
	transition: all 0.3s ease;
	border: none;
	background: none;
	color: white;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 60px;
	border-radius: 8px;
}


.nav-item:hover {
	background: rgba(255, 255, 255, 0.1);
	transform: scale(1.05);
}

.nav-item.active {
	color: var(--primary-color);
	transform: scale(1.1);
	filter: drop-shadow(0 2px 4px rgba(255, 117, 24, 0.4));
	background: rgba(255, 117, 24, 0.2);
}

.nav-item i {
	font-size: 1.2rem;
	display: block;
	margin-bottom: 0.2rem;
}

.nav-item span {
	font-size: 0.7rem;
	display: block;
	font-weight: bold;
}

/* Dropdown Menu Styles */
.dropdown-menu {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(212, 165, 116, 0.98);
	background-image:
	repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(107, 69, 33, 0.15) 2px, rgba(107, 69, 33, 0.15) 3px);
	border: 3px solid var(--wood-frame);
	border-radius: 12px;
	box-shadow: var(--wood-shadow);
	backdrop-filter: blur(15px);
	-webkit-backdrop-filter: blur(15px);
	min-width: 150px;
	margin-bottom: 0.5rem;
	opacity: 0;
	visibility: hidden;
	transform: translateX(-50%) translateY(10px);
	transition: all 0.3s ease;
	z-index: 10001;
}

.dropdown-menu.show {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.dropdown-item {
	display: block;
	width: 100%;
	padding: 0.8rem 1rem;
	background: none;
	border: none;
	color: var(--text-color);
	text-align: left;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 0.9rem;
	font-weight: bold;
	border-radius: 8px;
	margin: 0.2rem;
}

.dropdown-item:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--primary-color);
	transform: translateX(2px);
}

.dropdown-item i {
	margin-right: 0.5rem;
	width: 16px;
	text-align: center;
}

/* Lessons Layout */
.lessons-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin: 1rem 0;
}

/* Shop and Settings tabs spacing */
#shop-tab .lesson-card,
#settings-tab .lesson-card {
	margin-bottom: 1rem;
}

#shop-tab .lesson-card:last-child,
#settings-tab .lesson-card:last-child {
	margin-bottom: 0;
}

/* Leaderboard Styles */
.leaderboard-item {
	background: linear-gradient(135deg, var(--wood-light), var(--wood-medium));
	background-image:
	repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(139, 90, 43, 0.1) 2px, rgba(139, 90, 43, 0.1) 3px);
	border: 3px solid var(--wood-frame);
	border-radius: 12px;
	padding: 1rem;
	margin-bottom: 0.8rem;
	display: flex;
	align-items: center;
	gap: 1rem;
	box-shadow: var(--shadow);
	transition: transform 0.2s ease;
}

.leaderboard-item:hover {
	transform: translateY(-2px);
}

.leaderboard-item.current-user {
	border-color: var(--primary-color);
	background: linear-gradient(135deg, rgba(255, 117, 24, 0.2), var(--wood-medium));
}

.rank {
	font-size: 1.5rem;
	font-weight: bold;
	color: var(--primary-color);
	min-width: 50px;
	text-align: center;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.user-info {
	flex: 1;
}

.username {
	font-size: 1.2rem;
	font-weight: bold;
	color: var(--text-color);
	margin-bottom: 0.3rem;
}

.user-stats {
	display: flex;
	gap: 1rem;
	font-size: 0.9rem;
	color: var(--text-color);
	opacity: 0.8;
}

.user-stats span {
	display: flex;
	align-items: center;
	gap: 0.3rem;
}

.user-stats i {
	color: var(--primary-color);
}

/* English Lesson Styles */
.english-lesson {
	border-left: 4px solid #007bff;
}

.english-lesson .lesson-icon {
	background: linear-gradient(145deg, #007bff 0%, #0056b3 50%, #004085 100%);
}

/* Lesson Filtering */
.lesson-card.hidden-lesson {
	display: none;
}

.lesson-card {
	background: linear-gradient(145deg, var(--wood-light) 0%, var(--card-bg) 50%, var(--wood-medium) 100%);
	border: 3px solid var(--wood-frame);
	border-radius: 20px;
	padding: 1.5rem;
	cursor: pointer;
	transition: all 0.3s ease;
	background-image:
	repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(166, 124, 82, 0.08) 2px, rgba(166, 124, 82, 0.08) 3px),
	repeating-linear-gradient(20deg, transparent, transparent 12px, rgba(107, 69, 33, 0.06) 12px, rgba(107, 69, 33, 0.06) 14px);
	position: relative;
	box-shadow: var(--shadow);
}

.lesson-card::before {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	right: 2px;
	bottom: 2px;
	border: 2px solid var(--wood-border);
	border-radius: 16px;
	pointer-events: none;
	box-shadow: inset 0 -2px 4px rgba(107, 69, 33, 0.15), inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.lesson-card::after {
	content: '';
	position: absolute;
	top: 12px;
	left: 12px;
	width: 6px;
	height: 6px;
	background: radial-gradient(circle, var(--metal-light) 30%, var(--metal-dark) 70%);
	border-radius: 50%;
	box-shadow: 
	inset 0 1px 1px rgba(0, 0, 0, 0.3),
	0 1px 1px rgba(255, 255, 255, 0.2),
	18px 0 0 -1px var(--metal-light),
	18px 0 0 0 var(--metal-dark);
}

.lesson-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgba(107, 69, 33, 0.4);
	border-color: var(--primary-color);
	filter: brightness(1.05);
}

.lesson-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.lesson-icon {
	width: 50px;
	height: 50px;
	min-width: 50px;
	background: linear-gradient(145deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
	border: 3px solid var(--wood-frame);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 1.5rem;
	flex-shrink: 0;
	box-shadow:
	inset 0 2px 4px rgba(255, 255, 255, 0.3),
	inset 0 -2px 4px rgba(139, 90, 43, 0.4),
	0 4px 8px rgba(107, 69, 33, 0.3);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	position: relative;
}

.lesson-icon::after {
	content: '';
	position: absolute;
	top: 8px;
	right: 8px;
	width: 4px;
	height: 4px;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 30%, rgba(255, 255, 255, 0.4) 70%);
	border-radius: 50%;
	box-shadow: 0 0 3px rgba(255, 255, 255, 0.6);
}

.lesson-title {
	font-size: 1.3rem;
	font-weight: bold;
	margin: 0;
}

.lesson-description {
	margin: 0.5rem 0;
	opacity: 0.8;
}

.lesson-meta {
	display: flex;
	justify-content: space-between;
	font-size: 0.9rem;
	opacity: 0.7;
}

/* Lesson Play Screen */
.lesson-play-screen {
	padding: 1rem;
}

.lesson-header-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
}

.cancel-button {
	background: linear-gradient(135deg, #dc3545, #c82333);
	border: 3px solid var(--wood-frame);
	border-radius: 12px;
	padding: 0.8rem 1.5rem;
	color: white;
	cursor: pointer;
	font-weight: bold;
	transition: all 0.3s ease;
	display: inline-block;
	text-decoration: none;
}

.cancel-button:hover {
	transform: scale(1.05);
}

.hidden {
	display: none !important;
}

/* Cat View Screen */
.cat-view-screen {
	padding: 1rem;
}

.cat-view-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
}

.cat-view-header h2 {
	margin: 0;
	text-align: center;
}

.cat-view-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2rem;
}

.cat-display {
	width: 100%;
	max-width: 300px;
	height: 300px;
	border-radius: 20px;
	overflow: hidden;
	border: 6px solid var(--wood-frame);
	box-shadow: var(--wood-shadow);
	background: linear-gradient(135deg, var(--wood-light), var(--wood-medium));
	display: flex;
	align-items: center;
	justify-content: center;
}

.fullscreen-cat {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 15px;
}

.cat-stats {
	background: linear-gradient(135deg, var(--wood-light), var(--wood-medium));
	background-image:
	repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(139, 90, 43, 0.1) 2px, rgba(139, 90, 43, 0.1) 3px);
	border: 4px solid var(--wood-frame);
	border-radius: 16px;
	padding: 1.5rem;
	width: 100%;
	max-width: 300px;
	box-shadow: var(--wood-shadow);
}

.cat-stat-item {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	margin-bottom: 1rem;
	color: var(--text-color);
	font-size: 1.1rem;
	font-weight: bold;
}

.cat-stat-item:last-child {
	margin-bottom: 0;
}

.cat-stat-item i {
	font-size: 1.3rem;
	color: var(--primary-color);
	width: 20px;
	text-align: center;
}

/* Cat Images */
.cat-image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 50%;
}

.loading-cat .cat-image,
.sad-cat .cat-image,
.happy-cat .cat-image {
	width: 100%;
	height: 100%;
}

/* Bootstrap Integration */
h1, h2, h3, h4, h5, h6 {
	color: var(--text-color);
}

.tab-content h2 {
	margin-bottom: 1.5rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 480px) {
	.screen {
		max-width: 100%;
		border-left: none;
		border-right: none;
	}

	.bottom-nav {
		border-left: none;
		border-right: none;
	}

	.sad-cat, .happy-cat {
		width: 150px;
		height: 150px;
		font-size: 4rem;
	}

	.speech-bubble {
		max-width: 250px;
		padding: 1.2rem;
	}

	.wooden-button {
		padding: 1rem 2rem;
		font-size: 1.2rem;
	}

	.pairs-grid {
		grid-template-columns: 1fr;
	}
}

/* Friends List Styles */
.friends-list-screen {
	padding: 1rem;
}

.friends-content {
	max-width: 600px;
	margin: 0 auto;
}

#friends-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.friend-card {
	background: var(--card-bg);
	background-image:
		repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(107, 69, 33, 0.1) 2px, rgba(107, 69, 33, 0.1) 3px),
		repeating-linear-gradient(15deg, transparent, transparent 10px, rgba(166, 124, 82, 0.05) 10px, rgba(166, 124, 82, 0.05) 12px);
	border: 3px solid var(--wood-frame);
	border-radius: 15px;
	padding: 1rem;
	display: flex;
	align-items: center;
	gap: 1rem;
	box-shadow: var(--wood-shadow);
	transition: transform 0.2s ease;
}

.friend-card:hover {
	transform: translateY(-2px);
}

.friend-avatar {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
}

.avatar-emoji {
	font-size: 3rem;
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 117, 24, 0.2);
	border-radius: 50%;
	border: 2px solid var(--primary-color);
}

.friend-level {
	font-size: 0.7rem;
	background: var(--primary-color);
	color: white;
	padding: 0.2rem 0.5rem;
	border-radius: 10px;
	font-weight: bold;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.friend-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.friend-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.friend-name {
	font-weight: bold;
	font-size: 1.1rem;
	color: var(--text-color);
}

.last-seen {
	font-size: 0.8rem;
	color: var(--wood-border);
	font-style: italic;
}

.cat-info {
	display: flex;
	gap: 1rem;
	font-size: 0.9rem;
}

.cat-name {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	color: var(--text-color);
}

.cat-happiness {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	color: var(--primary-color);
	font-weight: bold;
}

.cat-name i,
.cat-happiness i {
	font-size: 0.8rem;
}

/* Profile Screen Styles */
.profile-screen {
	padding: 1rem;
}

.profile-content {
	max-width: 600px;
	margin: 0 auto;
}

.profile-section {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.profile-input {
	background: rgba(255, 255, 255, 0.9);
	border: 2px solid var(--wood-frame);
	border-radius: 8px;
	padding: 0.5rem;
	font-size: 1rem;
	color: var(--text-color);
	width: 200px;
	margin-right: 0.5rem;
}

[data-theme="dark"] .profile-input {
	background: rgba(38, 38, 38, 0.9);
	color: var(--text-color);
}

[data-theme="dark"] .dropdown-menu {
	background: rgba(44, 24, 16, 0.98);
	background-image:
		repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0, 0, 0, 0.2) 2px, rgba(0, 0, 0, 0.2) 3px);
	border-color: var(--wood-frame);
}

[data-theme="dark"] .dropdown-item:hover {
	background: rgba(255, 117, 24, 0.2);
}

.profile-input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 8px rgba(255, 117, 24, 0.3);
}

.wooden-button.small {
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
}

.lesson-meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

@media (max-width: 480px) {
	.profile-input {
		width: 100%;
		margin-right: 0;
		margin-bottom: 0.5rem;
	}
	
	.lesson-meta {
		flex-direction: column;
		align-items: flex-start;
	}
}