:root {
	--primary-color: #d67ae0;
	--primary-color-rgb: 214, 122, 224;
	--text-on-primary: #000000;
	
	--bg-color: #f7f8fc;
	--surface-color: #ffffff;
	--text-color: #1c1c1f;
	--subtext-color: #65676b;
	
	--gradient-1: #eaaaff;
	--gradient-2: #f4f6f9;
	
	--icon-filter: invert(80%);
	--icon-filter-hover: invert(0%);
	
	--header-bg: rgba(247, 248, 252, 0.7);
	--footer-bg: #eff1f5;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.07);
}

@media (prefers-color-scheme: dark) {
	:root {
		--primary-color: #eab5ee;
		--primary-color-rgb: 234, 181, 238;
		--text-on-primary: #000;

		--bg-color: #0d1117;
		--surface-color: #161b22;
		--text-color: #e6edf3;
		--subtext-color: #848d97;
		
		--gradient-1: #1e0a29;
		--gradient-2: #0d1117;

		--icon-filter: invert(10%) sepia(8%) saturate(93%) hue-rotate(170deg) brightness(95%) contrast(84%);
		--icon-filter-hover: invert(90%);

		--header-bg: rgba(13, 17, 23, 0.7);
		--footer-bg: #161b22;
	}
}
	
#snowflakes-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 9999;
}
.snowflake {
	position: absolute;
	top: -10px;
	background-image: url('snow.png');
	background-size: cover;
	width: 25px;
	height: 25px;
	opacity: 0.07;
	filter: drop-shadow(0 0 5px #add8e6) brightness(0) saturate(100%) invert(95%) sepia(1%) saturate(7487%) hue-rotate(175deg) brightness(119%) contrast(119%);
	z-index: 2005;
}

/* Animations */
@keyframes start-startbutton { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes start-maintext {
	0% { opacity: 0; transform: translateY(20px); filter: blur(5px); }
	100% { opacity: 1; transform: translateY(0); filter: blur(0px); }
}
@keyframes pulse {
    0% { transform: scale(1) translateX(-50%); }
    50% { transform: scale(1.05) translateX(-50%); }
    100% { transform: scale(1) translateX(-50%); }
}

/* General Styles */
* {
	/* font-family: 'Comfortaa', cursive, sans-serif !important; */
	font-family: "M PLUS Rounded 1c", sans-serif;
	box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
	margin: 0;
	padding: 0;
	background: var(--bg-color) !important;
	color: var(--text-color);
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar Styles */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: rgba(var(--primary-color-rgb), 0.5); border-radius: 10px; border: 2px solid var(--bg-color); }
::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--primary-color-rgb), 0.8); }

/* Header Styles */
.header {
	position: fixed; top: 0; left: 0;
	width: 100%; height: 60px;
	padding: 0 20px;
	z-index: 1011;
	background: var(--header-bg);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	display: flex;
	align-items: center;
	border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1);
}
.header img { margin-right: 12px; }
.header h1 { font-size: 22px; font-weight: bold; margin: 0; color: var(--text-color); }

/* Main Section Styles */
.main {
	background-image: linear-gradient(to bottom, var(--gradient-1), var(--gradient-2), var(--bg-color));
	width: 100%; height: 100vh;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	position: relative;
	margin-bottom: 40px;
	overflow: hidden;
    text-align: center;
}
.main-text {
	color: var(--text-color);
	font-size: 48px;
	font-weight: bold;
	text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
	animation: start-maintext 0.8s 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.main-text h2 {
    font-size: 18px;
    font-weight: 400;
    color: var(--subtext-color);
    min-height: 45px;
    margin-top: 10px;
}

.start-button {
	position: absolute; bottom: 15%; left: 50%;
	transform: translateX(-50%);
	background: transparent;
	width: 60px; height: 60px;
	animation: start-startbutton 0.8s 0.6s both, pulse 2s infinite 1.5s;
	border: 2px solid var(--text-color);
	border-radius: 50%;
	transition: all 0.3s ease-in-out;
	display: flex; justify-content: center; align-items: center;
    cursor: pointer;
}
.start-button img { filter: var(--icon-filter); transition: all 0.3s ease; }
.start-button:hover { background-color: var(--primary-color); border-color: var(--primary-color); }
.start-button:hover img { filter: var(--icon-filter-hover); }

/* Home Section */
.home { padding: 40px 0; width: 95%; max-width: 1400px; margin: 0 auto; }
.logo-block { border-radius: 5px; object-fit: cover; background-color: rgba(var(--primary-color-rgb), 0.05); padding: 4px; }

/* Category Styles */
.category-container {
	margin-bottom: 1.5rem;
	border-radius: 16px;
	background-color: var(--surface-color);
	box-shadow: var(--shadow-md);
	overflow: hidden;
	transition: all 0.3s ease;
    border: 1px solid rgba(var(--primary-color-rgb), 0.1);
}
.category {
	padding: 15px 20px;
	display: flex;
	align-items: center;
	cursor: pointer;
	transition: background-color 0.3s;
    position: relative;
}
.category:hover { background-color: rgba(var(--primary-color-rgb), 0.05); }
.category::after {
    content: '❯';
    position: absolute;
    right: 20px;
    top: 48%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.4s ease;
    font-size: 20px;
    color: var(--subtext-color);
}
.category.expanded::after { transform: translateY(-50%) rotate(90deg); }
.category img { margin-right: 15px; filter: var(--icon-filter); }
.category h2 { flex-grow: 1; font-size: 18px; margin: 0; font-weight: bold; }

.gridl {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(425px, 1fr));
    gap: 1rem;
}

.category-content {
	overflow: hidden;
	padding: 0 20px;
	transition: max-height 0.5s ease-in-out, padding .5s ease-in-out;
	max-height: 0;
}
.category.expanded + .category-content { padding-top: 10px; padding-bottom: 20px; }
div[id^="yandex_rtb"] { grid-column: 1 / -1; margin: 1rem 0; display: flex; justify-content: center; }

/* Block Styles */
.block {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 80px;
	background-color: var(--bg-color);
	color: var(--text-color);
	border-radius: 12px;
	padding: 15px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
}
.block:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(var(--primary-color-rgb), 0.2); }
.block h2 {
	flex-grow: 1;
	font-size: 16px;
	margin: 0 0 0 15px;
	font-weight: bold;
	text-align: left;
}
.block h6 {
	font-size: 11px;
	font-weight: bold;
	text-align: right;
	padding: 4px 10px;
	margin: 0 8px 0 0;
	border-radius: 20px;
    background-color: rgba(128, 128, 128, 0.15);
    color: var(--subtext-color);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.best { background-color: rgba(var(--primary-color-rgb), 0.15) !important; color: var(--primary-color) !important; }
.dev { background-color: rgba(255, 143, 143, 0.15) !important; color: #ff8f8f !important; }
.ad { background-color: rgba(255, 222, 84, 0.15) !important; color: #ffde54 !important; }

.button {
	display: inline-block;
	color: var(--primary-color);
	font-size: 14px;
	padding: 8px 18px;
	border: 2px solid var(--primary-color);
	border-radius: 10px;
	text-decoration: none;
	transition: all 0.3s ease-in-out;
	font-weight: bold;
    background-color: transparent;
    white-space: nowrap;
}
.button:hover { background-color: var(--primary-color); color: var(--text-on-primary); transform: scale(1.05); }

.blockk { width: 100%; padding: 20px; margin: 40px auto; text-align: center; }
.donation-buttons, .social-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.donation-buttons { margin-bottom: 2rem; }

.buttontink, .buttonyumoney {
    flex: 1; max-width: 200px; min-width: 150px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
	font-size: 16px; border: 2px solid; border-radius: 12px;
	transition: all 0.3s ease-in-out; padding: 10px 20px; font-weight: bold;
    background-color: transparent; text-decoration: none; cursor: pointer;
}
.buttontink { border-color: #fab619; color: #fab619; }
.buttontink:hover { background-color: #fab619; color: #000; }
.buttonyumoney { border-color: #702ff4; color: var(--text-color); }
.buttonyumoney:hover { background-color: #702ff4; color: #fff; }
.buttonyumoney img { filter: var(--icon-filter); transition: filter 0.3s; }
.buttonyumoney:hover img { filter: invert(100%); }

.buttonnn {
	display: inline-flex; justify-content: center; align-items: center;
	border: 2px solid var(--subtext-color);
	border-radius: 50%;
	transition: all 0.3s ease-in-out;
	width: 50px; height: 50px;
    background-color: transparent;
}
.buttonnn:hover { border-color: var(--primary-color); background-color: var(--primary-color); transform: translateY(-3px); }
.buttonnn img { width: 28px; height: 28px; filter: var(--icon-filter); transition: filter 0.3s ease-in-out; }
.buttonnn:hover img { filter: var(--icon-filter-hover); }
.android-button { display: none; }
@media screen and (max-width: 1400px) and (-webkit-min-device-pixel-ratio: 4) { .android-button { display: inline-flex; } }

/* Footer Styles */
.footer {
	color: var(--subtext-color); text-align: center; padding: 40px 20px; background-color: var(--footer-bg);
    border-top: 1px solid rgba(var(--primary-color-rgb), 0.1);
}
.footer-content { width: 90%; max-width: 800px; margin: 0 auto; }
.footer-text { font-size: 14px; margin: 1rem 0; line-height: 1.6; }
.footer-links a { color: var(--primary-color); text-decoration: none; transition: opacity 0.3s; }
.footer-links a:hover { opacity: 0.8; }

/* Modal Styles */
.modal {
	display: none; position: fixed; z-index: 2002;
	left: 0; top: 0; width: 100%; height: 100%;
	background-color: rgba(0,0,0,0.6);
	backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
	align-items: center; justify-content: center;
    padding: 20px;
}
.modal-content-wrapper { padding: 0; width: 100%; max-width: 600px; max-height: 90vh; }
.modal-content {
	background: var(--surface-color); border-radius: 20px; position: relative;
    overflow-y: auto; max-height: 90vh;
    border: 1px solid rgba(var(--primary-color-rgb), 0.1);
    box-shadow: var(--shadow-lg);
}
.close {
	position: absolute; right: 15px; top: 15px;
	width: 35px; height: 35px;
	font-size: 30px; font-weight: bold; color: var(--subtext-color);
	cursor: pointer; border-radius: 50%; display: flex;
	justify-content: center; align-items: center;
	transition: all 0.2s; z-index: 1;
    background: var(--bg-color);
}
.close:hover { color: var(--text-color); transform: rotate(90deg); }
.modal-header { padding: 25px; border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1); }
.modal-header h2 { margin: 0; color: var(--text-color); }
.modal-body {
	color: var(--text-color); padding: 25px;
	display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.modal-body img { border-radius: 15px; max-width: 100%; height: auto; }
.modal-body p { line-height: 1.6; margin: 0; }
.modal .button { margin-top: 1rem; padding: 10px 25px; }

/* Telegram Chat Widget */
.telegram-button {
	position: fixed; bottom: 20px; right: 20px;
	width: 55px; height: 55px;
	background-color: var(--primary-color); color: var(--text-on-primary);
	border-radius: 50%; cursor: pointer;
	box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.4);
	transition: transform 0.3s ease, opacity 0.3s ease;
	display: flex; justify-content: center; align-items: center;
	transform: scale(0); opacity: 0; z-index: 1000;
}
.telegram-button.visible { transform: scale(1); opacity: 1; }
.telegram-button:hover { transform: scale(1.1) !important; }
.telegram-button img { width: 50%; height: 50%; filter: var(--icon-filter-hover); }

.telegram-popup {
	position: fixed; bottom: 90px; right: 20px;
	background-color: var(--surface-color); border-radius: 20px;
	box-shadow: var(--shadow-lg);
	width: 340px; max-height: 0;
	overflow: hidden; opacity: 0;
	transform: translateY(20px);
	transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    border: 1px solid rgba(var(--primary-color-rgb), 0.1);
}
.telegram-popup.active { max-height: 60vh; opacity: 1; transform: translateY(0); }
.headertg {
	background-color: var(--bg-color); color: var(--text-color); padding: 10px 15px;
	display: flex; align-items: center; border-bottom: 1px solid rgba(var(--primary-color-rgb), 0.1); font-size: 16px;
}
.headertg img { width: 40px; height: 40px; border-radius: 50%; margin-right: 10px; }
.ntt { display: flex; flex-direction: column; }
.nt { padding: 0; margin: 2px 0 0; color: var(--subtext-color); font-size: 12px; }
.message { height: calc(60vh - 122px); color: var(--text-color); }
.chat-container { display: flex; flex-direction: column; height: 100%; }
.chat-box { flex-grow: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.chat-message {
	padding: 10px 15px; margin: 0; border-radius: 18px;
	max-width: 85%; word-wrap: break-word; line-height: 1.5;
	animation: start-startbutton 0.4s 1; user-select: text;
}
.user-message { align-self: flex-end; background-color: var(--primary-color); color: var(--text-on-primary); border-radius: 18px 18px 5px 18px; }
.gpt-message { align-self: flex-start; background-color: var(--bg-color); border-radius: 18px 18px 18px 5px; }
.error-message { align-self: center; background-color: transparent; color: #ff5555; }
.chat-input-container {
	display: flex; align-items: center; background-color: var(--bg-color);
	padding: 8px; border-top: 1px solid rgba(var(--primary-color-rgb), 0.1);
}
.chat-input {
	flex-grow: 1; border: none; background-color: var(--surface-color); color: var(--text-color);
    padding: 10px 15px; border-radius: 20px;
}
.chat-input:focus { outline: none; box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.3); }
.send-button, .clear-button {
	cursor: pointer; border: none; background: none; padding: 8px;
	display: flex; justify-content: center; align-items: center;
	border-radius: 50%; transition: all 0.2s ease-in-out; margin: 0 5px;
}
.send-button img, .clear-button img { filter: var(--icon-filter); }
.send-button:hover, .clear-button:hover { background-color: rgba(var(--primary-color-rgb), 0.1); }
.send-button:disabled { cursor: not-allowed; opacity: 0.5; }

/* Misc */
.edittext {
	color: var(--text-color) !important; width: 100%; margin-right: 8px;
	font-size: 14px; padding: 8px 18px;
	border: 2px solid var(--subtext-color); border-radius: 10px;
	transition: all 0.3s ease-in-out; background-color: transparent;
}
.edittext:focus { border-color: var(--primary-color); outline: none; }
.custoast {
    background-color: var(--surface-color) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border-radius: 12px !important;
    color: var(--text-color) !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

#iframeOverlay {
	position: fixed; top: 0; left: 0;
	width: 100%; height: 100%;
	z-index: 9999;
	display: flex; justify-content: center; align-items: center;
	background: var(--bg-color); transition: opacity 0.5s 0.5s;
}
.fade-out { opacity: 0; pointer-events: none; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spinner {
	width: 50px; height: 50px;
	background-image: url('favicon.png'); background-size: cover;
	animation: spin 1.5s linear infinite;
}

/* Loader in "Site" category */
.loader-container { padding: 2rem; }
.loader {
    border: 4px solid var(--primary-color); border-radius: 50%;
    border-top: 4px solid transparent; width: 36px; height: 36px;
    animation: spin 1s linear infinite; margin: 0 auto;
}
.container#data-container { width: 100%; transition: opacity 0.5s; opacity: 0; }
.content#site-content {     display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(425px, 1fr)); }
.card {
    background-color: var(--bg-color); padding: 15px; border-radius: 12px;
    transition: all 0.3s; cursor: pointer;
}
.card:hover { transform: translateY(-3px); background-color: rgba(var(--primary-color-rgb), 0.05); }
.card-title { font-size: 1em; margin-bottom: 5px; font-weight: bold; }
.card-text { font-size: 0.9em; line-height: 1.5; color: var(--subtext-color); }


@media (max-width: 768px) {
    .home { width: 100%; padding: 20px 15px; }
    .main-text { font-size: 36px; padding: 0 10px; }
    .main-text h2 { font-size: 16px; }
    .category-content { grid-template-columns: 1fr; }
    .donation-buttons { flex-direction: column; align-items: center; }
    .telegram-popup { width: calc(100% - 40px); }
}
@media (max-width: 480px) {
    .block { flex-direction: column; align-items: flex-start; gap: 10px; }
    .block h2 { margin-left: 0; }
    .block a.button { margin-left: auto; }
}
