.mobile-phone {
	width: 100%;
	max-width: 375px;
	height: 100vh;
	margin: 0 auto;
	background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
	position: relative;
	display: flex;
	flex-direction: column;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.mobile-statusbar {
	height: 24px;
	background: #000;
	color: #fff;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0 10px;
	font-size: 12px;
	font-weight: bold;
	flex-shrink: 0;
}

.mobile-screen {
	flex: 1;
	background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
	overflow-y: auto;
	padding: 20px;
	display: flex;
	flex-direction: column;
}

.mobile-apps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	padding: 10px;
}

.mobile-app {
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: pointer;
	transition: transform 0.2s;
}

.mobile-app:active {
	transform: scale(0.95);
}

.app-icon {
	width: 60px;
	height: 60px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	margin-bottom: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	border: 2px solid rgba(255, 255, 255, 0.2);
}

.app-icon-about {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	overflow: hidden;
	padding: 0;
}

.app-icon-about img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.app-icon-works {
	background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.app-icon-github {
	background: #000;
}

.app-icon-game {
	background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.app-icon-snake {
	background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
}

.app-icon-chat {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.app-name {
	color: #fff;
	font-size: 11px;
	text-align: center;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.mobile-app-view {
	position: absolute;
	top: 24px;
	left: 0;
	right: 0;
	bottom: 0;
	background: #f5f5f5;
	display: none;
	flex-direction: column;
	z-index: 100;
	padding-bottom: 50px;
}

.mobile-app-view.active {
	display: flex;
}

.mobile-app-header {
	height: 50px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	display: flex;
	align-items: center;
	padding: 0 15px;
	flex-shrink: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	position: relative;
}

.back-btn {
	background: none;
	border: none;
	color: #fff;
	font-size: 24px;
	cursor: pointer;
	padding: 5px 10px;
	margin-right: 10px;
	position: absolute;
	left: 5px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s;
}

.back-btn:active {
	background-color: rgba(255, 255, 255, 0.2);
}

.app-title {
	text-align: center;
	font-size: 18px;
	font-weight: 600;
	flex: 1;
	letter-spacing: 0.5px;
}

.mobile-app-content {
	flex: 1;
	overflow-y: auto;
	padding: 15px;
	background: #fff;
}

.about-photo {
	text-align: center;
	margin-bottom: 20px;
}

.about-photo img {
	width: 120px;
	height: 120px;
	border-radius: 60px;
	border: 3px solid #667eea;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.about-info p {
	margin: 12px 0;
	line-height: 1.6;
	color: #333;
	font-size: 14px;
}

.about-info b {
	color: #667eea;
}

.about-info a {
	color: #667eea;
	text-decoration: none;
}

.mobile-app-content h3 {
	color: #667eea;
	border-bottom: 2px solid #667eea;
	padding-bottom: 5px;
	margin-top: 20px;
	margin-bottom: 15px;
	font-size: 16px;
}

.paper-item {
	margin-bottom: 15px;
	padding: 10px;
	background: #f9f9f9;
	border-left: 3px solid #667eea;
	font-size: 13px;
	line-height: 1.5;
	color: #333;
}

.paper-item a {
	color: #667eea;
	text-decoration: none;
}

.mobile-btn {
	display: inline-block;
	padding: 12px 30px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	text-decoration: none;
	border-radius: 25px;
	font-weight: bold;
	font-size: 14px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s;
}

.mobile-btn:active {
	transform: scale(0.95);
}

.mobile-navbar {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 50px;
	background: #000;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-shrink: 0;
	border-top: 1px solid #333;
	z-index: 200;
}

.nav-btn {
	background: none;
	border: none;
	color: #fff;
	font-size: 24px;
	cursor: pointer;
	padding: 10px 20px;
	border-radius: 8px;
	transition: background 0.2s;
}

.nav-btn:active {
	background: rgba(255, 255, 255, 0.1);
}

#theme-btn-mobile {
	position: absolute;
	left: 20px;
}

#theme-btn-mobile.dimmed {
	opacity: 0.3;
	filter: grayscale(80%);
}

#home-btn {
	position: relative;
}

.mobile-app-content::-webkit-scrollbar {
	width: 6px;
}

.mobile-app-content::-webkit-scrollbar-track {
	background: #f1f1f1;
}

.mobile-app-content::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 3px;
}

.mobile-app-content::-webkit-scrollbar-thumb:hover {
	background: #555;
}

#mobile-app-minesweeper .minesweeper-board,
#mobile-app-snake #snake-canvas-mobile {
	max-width: 100%;
	margin: 0 auto;
}

#mobile-app-minesweeper .mine-cell.flagged::after {
	content: '🚩';
	font-size: 18px;
}

#mobile-app-minesweeper .mine-cell.revealed.mine::after {
	content: '💣';
	font-size: 18px;
}

body.mobile-mode.dark-theme .mobile-phone {
	background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

body.mobile-mode.dark-theme .mobile-screen {
	background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

body.mobile-mode.dark-theme .mobile-app-view {
	background: #1a1a1a;
}

body.mobile-mode.dark-theme .mobile-app-content {
	background: #1a1a1a;
	color: #e0e0e0;
}

body.mobile-mode.dark-theme .about-info p {
	color: #e0e0e0;
}

body.mobile-mode.dark-theme .paper-item {
	background: #2a2a2a;
	color: #e0e0e0;
	border-left-color: #667eea;
}

body.mobile-mode.dark-theme .mobile-app-content h3 {
	color: #8b9eff;
	border-bottom-color: #667eea;
}

.snake-controls {
	margin-top: 15px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.control-row {
	display: flex;
	gap: 8px;
	justify-content: center;
}

.control-btn {
	width: 60px;
	height: 60px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	border-radius: 12px;
	color: white;
	font-size: 24px;
	cursor: pointer;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	transition: all 0.2s;
	user-select: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

.control-btn:active {
	transform: scale(0.9);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.mobile-mode.dark-theme .control-btn {
	background: linear-gradient(135deg, #4a5eaa 0%, #5a3a82 100%);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}
