:root {
	--brand-blue: #0065b3;
	--brand-orange: #ff9e1b;
	--bg-gradient: linear-gradient(135deg, #005699 0%, #0072c6 100%);
	--glass-bg: rgba(255, 255, 255, 0.12);
	--glass-border: rgba(255, 255, 255, 0.25);
	--glass-hover: rgba(255, 255, 255, 0.2);
	--text-white: #ffffff;
	--text-white-dim: rgba(255, 255, 255, 0.7);
	--text-dark: #0f172a;
	--text-muted: #64748b;
	--radius-lg: 20px;
	--radius-sm: 12px;
	--header-height: 60px;
	--font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; user-select: none; }

body {
	font-family: var(--font-family);
	background: var(--bg-gradient);
	color: var(--text-white);
	height: 100dvh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.app-wrapper {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 10px 20px 20px 20px;
	max-width: 600px;
	margin: 0 auto;
	width: 100%;
	justify-content: flex-start;
	gap: 15px;
	padding-bottom: max(20px, env(safe-area-inset-bottom));
	position: relative;
	z-index: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

header {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	height: var(--header-height);
	margin-bottom: 0;
	flex-shrink: 0;
}

.header-controls { display: flex; gap: 8px; align-items: center; }

.lang-select {
	appearance: none;
	background: rgba(0, 0, 0, 0.2);
	border: 1px solid rgba(255,255,255,0.15);
	color: white;
	padding: 6px 10px;
	border-radius: 12px;
	font-size: 1.1rem;
	font-family: var(--font-family);
	cursor: pointer;
	text-align: center;
	height: 36px;
	width: calc(1.5rem + 10px + 10px);
}
.lang-select option { background: #005699; color: white; font-size: 0.9rem; }

.hub-header {
	text-align: center;
	padding: 10px 0;
	flex-shrink: 0;
}

.hub-header .logo-img {
	height: 70px;
	width: auto;
	object-fit: contain;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.hub-title {
	font-size: 1.5rem;
	font-weight: 900;
	color: #ffffff;
	margin-top: 10px;
	letter-spacing: 0.5px;
	text-shadow: 0 2px 10px rgba(0,0,0,0.1);
	line-height: 1.2;
	text-transform: uppercase;
}

.category-label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: rgba(255, 255, 255, 0.7);
	margin: 35px 0 10px 5px;
	font-weight: 800;
	border-bottom: 1px solid rgba(255,255,255,0.1);
	padding-bottom: 5px;
}

.grid-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: auto;
	margin-top: 5px;
}

.tool-card {
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-radius: var(--radius-lg);
	padding: 15px;
	text-align: center;
	text-decoration: none;
	color: white;
	transition: transform 0.2s, background 0.2s;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 120px;
	box-shadow: 0 4px 10px rgba(0,0,0,0.05);
	position: relative;
	overflow: hidden;
}
.tool-card:active { transform: scale(0.96); background: var(--glass-hover); }
.tool-card.soon { opacity: 0.5; border-color: rgba(255, 255, 255, 0.1); pointer-events: none; }

span.tool-icon {
	font-size: 3.2rem;
	margin-bottom: 8px;
	display: block;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

img.tool-icon {
	width: 3.2rem;
	margin-bottom: 8px;
	display: block;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.tool-name { font-weight: 700; font-size: 0.85rem; line-height: 1.2; }

.badge {
	position: absolute; top: 8px; right: 8px;
	background: var(--brand-orange); color: white;
	font-size: 0.55rem; font-weight: 800;
	padding: 3px 6px; border-radius: 6px;
	text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-soon { background: #10b981; }

.full-width { grid-column: span 2; }

@media (min-width: 600px) {
	.grid-container { grid-template-columns: repeat(3, 1fr); }
	.full-width { grid-column: span 3; }
	.app-wrapper { max-width: 750px; }
	.tool-card { height: 160px; }
}

@media (max-height: 680px) {
	.app-wrapper { padding: 10px 15px; }
	.hub-header .logo-img { height: 50px; }
	.hub-title { font-size: 1.3rem; }
}