/* ===========================
   GLOBAL VARIABLES
=========================== */
@font-face {
	font-family: 'Comfortaa';
	src: url("Comfortaa-VariableFont_wght.ttf") format("opentype");
}

:root {
	--radius: 14px;
	--transition: 0.25s ease;

	--bg: #0f0f0f;
	--bg-soft: #1a1a1a;
	--bg-glass: rgba(255, 255, 255, 0.06);

	--text: #ffffff;
	--text-soft: #cfcfcf;

	--accent: #4da3ff;
	--accent-hover: #77b8ff;

	--card-bg: rgba(255, 255, 255, 0.08);
	--card-border: rgba(255, 255, 255, 0.15);
}

@media (prefers-color-scheme: light) {
	:root {
		--bg: #f5f5f5;
		--bg-soft: #ffffff;
		--bg-glass: rgba(0, 0, 0, 0.05);

		--text: #111;
		--text-soft: #444;

		--accent: #0066ff;
		--accent-hover: #0050cc;

		--card-bg: rgba(0, 0, 0, 0.05);
		--card-border: rgba(0, 0, 0, 0.1);
	}
}

@media (prefers-color-scheme: light) {
	body {
		background:
			var(--page-background-light) center/cover no-repeat,
			radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0) 60%),
			linear-gradient(135deg, #f0f0f0, #dcdcdc);
		background-attachment: fixed;
	}
}

@media (prefers-color-scheme: dark) {
	body {
		background:
			var(--page-background-dark) center/cover no-repeat,
			radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0) 60%),
			linear-gradient(135deg, #0f0f0f, #1a1a1a);
		background-attachment: fixed;
	}
}

/* ===========================
   BASE
=========================== */
html, body {
	overflow-x: hidden;
	width: 100%;
}

body {
	margin: 0;
	padding: 0;
	color: var(--text);
	font-family: 'Comfortaa', sans-serif;
	text-align: center;
	background-size: cover;
	/* background:
		radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 60%),
		radial-gradient(circle at center, #1a1a1a 0%, #0f0f0f 70%, #000 100%); */
	background-size: cover;
}

#parent {
	display: none;
}

/* ===========================
   CONTAINERS
=========================== */
.container,
.ui-container {
	max-width: 900px;
	margin: 0 auto;
	padding: 20px;
}

/* ===========================
   BUTTONS
=========================== */

.button {
	display: block;
	width: auto;
	min-width: 200px;
	max-width: 90%;
	margin: 10px auto;

	padding: 14px 20px;

	background: linear-gradient(to right,
			rgba(255, 255, 255, 0) 0%,
			rgba(255, 255, 255, 0.15) 50%,
			rgba(255, 255, 255, 0) 100%);

	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--radius);

	color: var(--text);
	font-size: 18px;
	text-decoration: none;

	backdrop-filter: blur(12px);
	transition: var(--transition);
	cursor: pointer;
}

.button:hover {
	background: linear-gradient(to right,
			rgba(255, 255, 255, 0) 0%,
			var(--accent-hover) 50%,
			rgba(255, 255, 255, 0) 100%);
	color: white;
	transform: translateY(-2px);
}

.button:active {
	transform: scale(0.97);
}

/* ===========================
   NAVIGATION BAR
=========================== */

.navbar {
	padding: 15px;
	background: var(--bg-soft);
	border-bottom: 1px solid var(--card-border);
	position: sticky;
	top: 0;
	z-index: 10;
	backdrop-filter: blur(12px);
}

.nav-title {
	font-size: 22px;
	font-weight: bold;
}

/* ===========================
   FOOTER
=========================== */

.footer {
	margin-top: 40px;
	padding: 20px;
	color: var(--text-soft);
	font-size: 14px;
}

/* ===========================
   UNIVERSAL GRID
=========================== */

.ui-grid {
	display: grid;
	gap: 20px;
	justify-items: center;
}

.ui-grid-auto {
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.ui-grid-2 {
	grid-template-columns: repeat(2, 1fr);
}

.ui-grid-3 {
	grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 700px) {

	.ui-grid-2,
	.ui-grid-3 {
		grid-template-columns: 1fr;
	}
}

/* ===========================
   UNIVERSAL CARD
=========================== */

.ui-card {
	width: 140px;
	height: 140px;
	border-radius: var(--radius);
	overflow: hidden;

	border: 1px solid rgba(255, 255, 255, 0.25);
	backdrop-filter: blur(12px);

	display: flex;
	align-items: center;
	justify-content: center;

	transition: var(--transition);
	cursor: pointer;
}

.ui-card:hover {
	transform: translateY(-4px);
	background: linear-gradient(to right,
			rgba(255, 255, 255, 0) 0%,
			rgba(255, 255, 255, 0.25) 50%,
			rgba(255, 255, 255, 0) 100%);
}

.ui-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ===========================
   UNIVERSAL BOTTOM PANEL
=========================== */

.ui-bottom-panel {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;

	padding: 16px 20px;
	box-sizing: border-box;

	background: linear-gradient(to right,
			rgba(255, 255, 255, 0) 0%,
			rgba(255, 255, 255, 0.15) 50%,
			rgba(255, 255, 255, 0) 100%);

	border-top: 1px solid rgba(255, 255, 255, 0.25);
	backdrop-filter: blur(12px);

	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;

	z-index: 9999;
}

.ui-bottom-padding {
	padding-bottom: 160px;
}

/* ===========================
   UNIVERSAL INPUTS
=========================== */

.ui-input {
	width: 100%;
	padding: 12px 16px;
	border-radius: var(--radius);
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.05);
	color: var(--text);
	font-size: 16px;
	backdrop-filter: blur(8px);
	transition: var(--transition);
	box-sizing: border-box;
}

.ui-input:focus {
	border-color: var(--accent);
	outline: none;
}

/* Wrapper for inputs with dropdown */
.ui-input-wrapper {
	position: relative;
	width: 100%;
}

/* ===========================
   UNIVERSAL DROPDOWN
=========================== */

.ui-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	margin-top: 6px;

	background: rgba(0, 0, 0, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--radius);

	display: none;
	pointer-events: none;
	z-index: 1000;

	backdrop-filter: blur(12px);
	overflow: hidden;
}

.ui-dropdown-item {
	padding: 10px 14px;
	cursor: pointer;
	color: var(--text-soft);
	transition: var(--transition);
}

.ui-dropdown-item:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--text);
}

/* ===========================
   UNIVERSAL LIST
=========================== */

.ui-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-top: 30px;
}

/* ===========================
   TIMER STATES (UNIVERSAL)
=========================== */

.ui-state-paused {
	box-shadow: 0 0 25px rgba(0, 150, 255, 0.4), inset 0 0 25px rgba(0, 150, 255, 0.2);
}

.ui-state-alert {
	border-color: #ff4040 !important;
	box-shadow: 0 0 28px rgba(255, 64, 64, 0.4), inset 0 0 22px rgba(255, 64, 64, 0.2);
	background: rgba(40, 15, 15, 0.88) !important;
}

.ui-state-alert .time {
	color: #ff6666 !important;
	text-shadow: 0 0 12px #ff4444;
}

.time {
	font-size: 32px;
	letter-spacing: 2px;
	margin: 8px 0 16px;
	color: var(--text);
}

/* ===========================
   FORM BLOCK
=========================== */

.ui-form {
	/* padding: 25px; */
	text-align: center;
}

.ui-form-grid input {
	max-width: 100%;
}

.ui-item {
	padding: 20px;
	border-radius: var(--radius);
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(12px);
	transition: var(--transition);
}

.ui-title {
	margin-bottom: 24px;
}

.ui-item:hover {
	border-color: var(--accent);
}

.ui-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
}

.ui-password-box {
	padding: 20px;
	border-radius: var(--radius);
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.15);
	text-align: center;
	font-size: 22px;
	letter-spacing: 1.5px;
	word-break: break-all;
	margin-bottom: 20px;
	backdrop-filter: blur(12px);
	transition: var(--transition);
}

.ui-password-copied {
	border-color: var(--accent) !important;
	box-shadow: 0 0 15px var(--accent);
}

.ui-checkbox {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	font-size: 18px;
}

.ui-checkbox input {
	width: 22px;
	height: 22px;
	cursor: pointer;
}

.ui-range {
	width: 100%;
	margin-top: 10px;
}

.ui-accent {
	color: var(--accent);
	font-weight: bold;
}