:root {
	--bg: #000000;
	--surface: rgba(255, 255, 255, 0.03);
	--surface-hover: rgba(255, 255, 255, 0.06);
	--border: rgba(255, 255, 255, 0.08);
	--border-hover: rgba(255, 255, 255, 0.18);
	--text: #f0f0f0;
	--text-muted: #888;
	--text-dim: #555;
	--accent: #e2e8f0;
	--accent-glow: rgba(226, 232, 240, 0.12);
	--radius: 14px;
	--radius-sm: 8px;
	--mono: 'JetBrains Mono', monospace;
	--sans: 'Sora', sans-serif;
	--max-w: 780px;
	--header-h: 60px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.noheader header, .nofooter footer {
	display: none !important;
}

.grid-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	background-size: 50px 50px;
	background-image: 
		linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
	pointer-events: none;
}

body::before {
	content: '';
	position: fixed;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
	background-size: 200px;
	opacity: 0.4;
	pointer-events: none;
	z-index: 0;
}

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html, body {
	font-family: var(--sans);
	scroll-behavior: smooth;
}

::-webkit-scrollbar {
	width: 4px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: var(--border-hover);
	border-radius: 4px;
}

body {
	background-color: rgba(10, 10, 10, 1);
    height: 100%;
	line-height: 1.7;
    width: 100%;
}

body.acceptsgridoverlay {
	color: var(--text);
	font-family: var(--sans);
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

body.acceptsgridoverlay::before {
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
	background-size: 200px;
	content: '';
	inset: 0;
	opacity: 0.4;
	position: fixed;
	pointer-events: none;
	z-index: 0;
}

header {
	position: fixed;
	top: 16px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 100;
	border-radius: var(--radius);
	width: calc(100% - 48px);
	max-width: var(--max-w);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	height: var(--header-h);
	background: rgba(10, 10, 10, 0.7);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	backdrop-filter: blur(20px);
	gap: 8px;
}

.header-logo {
	font-family: var(--mono);
	font-size: 13px;
	font-weight: 500;
	color: var(--text-muted);
	letter-spacing: -0.02em;
	white-space: nowrap;
	text-decoration: none;
}

.header-logo span {
	color: var(--text);
}

.header-links {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
}

.header-links a {
    display: inline-block;
    padding: 6px 12px;
    position: relative;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s, background 0.2s;
    text-decoration: none;
    line-height: 1;
    z-index: 1;
    text-align: center;
}

.header-links a:before,
.header-links a:after {
    opacity: 0;
    position: absolute;
    top: 50%;
    width: 10px;
    text-align: center;
    z-index: -1;
    transition: all 0.3s ease;
    pointer-events: none;
}

.header-links a:before {
    content: "[";
    left: 0;
    transform: translate(15px, -56%);
}

.header-links a:after {
    content: "]";
    right: 0;
    transform: translate(-15px, -54%);
}

.header-links a:hover:before {
    opacity: 1;
    transform: translate(-0px, -56%);
}

.header-links a:hover:after {
    opacity: 1;
    transform: translate(0px, -54%);
}

.header-links a:hover {
	color: var(--text);
}

.header-social i {
	display: none;
}

.header-links .header-source {
	border: 1px solid var(--border);
	color: var(--text-muted);
	display: flex;
	align-items: center;
	gap: 6px;
}

.header-links .header-source:after, .header-links .header-source:before {
	display: none;
}

.header-links .header-source:hover {
	border-color: var(--border-hover);
	color: var(--text);
}

main {
	margin: 0 auto;
	max-width: 1020px;
	padding: calc(var(--header-h) + 40px) 1rem 4rem 1rem;
	position: relative;
	z-index: 1;
}

section {
	margin-bottom: 28px;
}

footer {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    text-align: center;
}

footer > p, footer > p > a {
    color: var(--text-muted);
    font-size: 14px;
	text-decoration: none;
}

footer a:hover {
    color: var(--text-muted);
    text-decoration: underline;
}

.change-settings {
    cursor: pointer;
}

.change-settings:hover {
	text-decoration: underline;
}

.f-colored a {
    text-decoration: none !important;
}

#linkout-overlay {
	align-items: center;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	inset: 0;
	justify-content: center;
	opacity: 0;
	padding: 20px;
	pointer-events: none;
	position: fixed;
	transition: opacity 0.25s ease;
	z-index: 999999;
}

#linkout-overlay.open {
	opacity: 1;
	pointer-events: all;
}

#linkout-popup {
	background: rgba(25, 25, 25, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 16px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 880px;
	padding: 28px;
	backdrop-filter: blur(8px);
	transform: scale(0.92) translateY(12px);
	transition: transform 0.25s ease, opacity 0.25s ease;
	width: 100%;
}

#linkout-overlay.open #linkout-popup {
	transform: scale(1) translateY(0);
}

.linkout-popup-header {
	align-items: center;
	display: flex;
	gap: 12px;
    justify-content: center;
}

.linkout-popup-icon {
	color: var(--text);
	font-size: 28px;
	line-height: 1;
}

.linkout-popup-title {
	color: var(--text);
	font-size: 22px !important;
	font-weight: 300;
	margin: 0;
}

.linkout-popup-text {
	color: var(--text-muted);
	font-size: 20px !important;
	font-weight: 200;
	line-height: 1.6;
}

.linkout-popup-url {
	background: var(--surface);
	border-radius: 8px;
	font-size: 20px !important;
	font-weight: 200;
	overflow: hidden;
	padding: 16px 24px;
	text-overflow: ellipsis;
    text-align: center;
	white-space: nowrap;
}

.linkout-popup-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 4px;
}

.linkout-popup-actions button {
	border: none;
	border-radius: 10px;
	cursor: pointer;
    flex: 1;
	font-family: 'Poppins', sans-serif;
	font-size: 15px;
	padding: 10px 22px;
	transition: opacity 0.2s ease, transform 0.15s ease;
}

.linkout-popup-actions button:hover {
	opacity: 0.85;
	transform: translateY(-1px);
}

.linkout-popup-actions button:active {
	transform: translateY(0);
}

.linkout-btn-continue {
    background-color: var(--surface);
	color: var(--text);
}

.linkout-btn-back {
	background: var(--text);
	color: var(--text-dim);
}

@media (max-width: 630px) {
    footer > p, footer > p > a {
        font-size: 0.8rem;
    }

    header {
        top: 8px;
        width: calc(100% - 16px);
    }

    .header-inner {
        padding: 0 14px;
    }

    .header-links li.header-nav-item {
        display: none;
    }

	.header-links a {
		padding: 8px 14px;
	}

    .header-links a.header-social {
        border: 1px solid var(--border);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .header-links a.header-social:before,
    .header-links a.header-social:after {
        display: none;
    }

    .header-links a.header-social:hover {
        border-color: var(--border-hover);
        color: var(--text);
    }

	.header-social i {
		display: unset;
	}

    .hiddenonmobile {
        display: none;
    }
}