/* radenrudun.css */

:root {
	--head-bg: #f1f1f120;
	--bg-color: #f1f1f1;
	--text-color: #100c08;
	--shadow: #d6d6d6;
	--paragraph: #100c0895;
	--card: #f1f1f1;
	--true: #28cd5c;
	--red-code: #e03737;
	--yellow-code: #e0be37;
	--green-code: #28cd2d;
}

@media (prefers-color-scheme: dark) {
	:root {
		--head-bg: #100c0820;
		--bg-color: #100c08;
		--text-color: #f1f1f1;
		--shadow: #2c2c2c;
		--paragraph: #f1f1f195;
		--card: #100c08;
		--true: #4ae67b;
		--red-code: #e03737;
		--yellow-code: #e0be37;
		--green-code: #28cd2d;
	}
}

* {
	border: 0px solid red;
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg-color);
	color: var(--text-color);
	font-family: Rajdhani;
	font-weight: 600;
}

a {
	cursor: pointer;
}

#popupBg {
	position: fixed;
	display: none;
	width: 100%;
	height: 100vh;
	z-index: 998;
	backdrop-filter: blur(1px);
}
.ip-addres {
   position: fixed;
   display: flex;
   padding-right: 2rem;
   justify-content: end;
   bottom: 2rem;
   right: 50%;
   z-index: 1000;
   transform: translate(50%, 50%);
   width: 100%;
   max-width: 1100px;
   margin: 0 auto;
}
.ip-addres div {
   padding: 5px;
   backdrop-filter: blur(5px);
   border: 1px solid var(--shadow);
}
#ipAddres {
   color: var(--text-color);
   font-family: "JetBrains Mono";
   font-size: 14px;
}

.heading {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 2rem;
	margin: auto;
	max-width: 1100px;
	background: var(--head-bg);
	box-shadow: 0 0 5px var(--shadow);
	position: sticky;
	top: 0;
	backdrop-filter: blur(5px);
	z-index: 999;
}

h1 {
	margin: 0;
	font-size: 1.4rem;
}

.nav-pc {
	display: flex;
	gap: 10px;
}

.nav-pc a {
	text-decoration: none;
	color: var(--text-color);
	transition: 0.3s ease;
}

.nav-pc a:hover {
	text-decoration: underline;
	opacity: 0.75;
}

#hamburger {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

#hamburger1,
#hamburger2,
#hamburger3 {
	height: 4px;
	background: var(--text-color);
	border-radius: 1.5px;
	transition: 0.3s ease;
}

#hamburger1 {
	position: relative;
	display: block;
	width: 25px;
	top: -8px;
}

#hamburger2 {
	position: absolute;
	display: block;
	width: 15px;
	right: 0;
	top: 0px;
}

#hamburger3 {
	position: absolute;
	display: block;
	width: 25px;
	top: 8px;
	right: 0;
}

#sidebar {
	position: fixed;
	display: flex;
	flex-direction: column;
	top: 3.8rem;
	right: -40vw;
	width: 40vw;
	height: 100vh;
	z-index: 999;
	background: var(--head-bg);
	border: 1px solid var(--shadow);
	backdrop-filter: blur(5px);
	transition: 0.3s ease;
}

#sidebar span {
	padding: 1rem;
	font-weight: 700;
	font-size: 1.25rem;
	border-bottom: 1px solid var(--shadow);
}

#sidebar a {
	display: flex;
	gap: 5px;
	padding: 1rem 1.5rem;
	align-items: center;
	font-weight: 800;
	font-size: 14px;
	text-decoration: none;
	color: var(--text-color);
	transition: 0.3s ease;
}

#sidebar a:hover {
	background: var(--shadow);
	border-radius: 5px;
}

.main {
	padding: 2rem;
	max-width: 1100px;
	margin: auto;
}

h2 {
	font-family: Poppins;
	font-size: 3rem;
	font-weight: 800;
	line-height: 3.3rem;
	margin-bottom: 0.5rem;
}

p {
	color: var(--paragraph);
}

/* Statistik Utama */
.stat {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	margin-top: 2rem;
}

.stat div {
	padding: 1rem;
	border: 1px solid var(--shadow);
	background: var(--card);
}

.stat div:nth-child(1) {
	grid-column: span 3;
}

.stat div:nth-child(2),
.stat div:nth-child(3) {
	grid-column: span 1;
}

.stat div:nth-child(4),
.stat div:nth-child(5) {
	grid-column: span 1;
}

.stat p {
	display: flex;
	flex-direction: column;
	margin: 0;
	font-size: 14px;
}

.stat span {
	font-family: Poppins;
	font-size: 2rem;
	font-weight: 800;
	color: var(--text-color);
	margin-top: 0.3rem;
}

#avgLatency::after,
#latency::after {
	content: "ms";
	font-size: 1rem;
	color: var(--true);
	margin-left: 4px;
}

/* Section Box */
.section-box {
	margin-top: 2rem;
}

.section-box h4 {
	font-size: 1.25rem;
	margin-bottom: 0.75rem;
}

/* Status Code Grid */
.status-code-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 1rem;
}

.status-code-item {
	padding: 1rem;
	border: 1px solid var(--shadow);
	background: var(--card);
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.status-code-item span:first-child {
	font-family: Poppins;
	font-size: 1.25rem;
	font-weight: 800;
}

.status-code-total {
	font-size: 14px;
	color: var(--paragraph);
}

.status-code-item.success span:first-child {
	color: var(--green-code);
}
.status-code-item.client-error span:first-child {
	color: var(--yellow-code);
}
.status-code-item.server-error span:first-child {
	color: var(--red-code);
}

/* Country Grid */
.country-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 1rem;
}

.country-item {
	padding: 1rem;
	border: 1px solid var(--shadow);
	background: var(--card);
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	align-items: center;
}

.country-flag {
	font-size: 2rem;
}

.country-name {
	font-size: 13px;
	color: var(--paragraph);
}

.country-total {
	font-family: Poppins;
	font-size: 1.5rem;
	font-weight: 800;
}

/* Device Grid */
.device-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
}

.device-item {
	padding: 1rem;
	border: 1px solid var(--shadow);
	background: var(--card);
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.device-item span:first-child {
	font-size: 14px;
	color: var(--paragraph);
}

.device-total {
	font-family: Poppins;
	font-size: 1.75rem;
	font-weight: 800;
}

/* Top Endpoint */
.top-endpoint-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}

.top-endpoint-item {
	padding: 1rem;
	border: 1px solid var(--shadow);
	background: var(--card);
	display: flex;
	align-items: center;
	gap: 1rem;
}

.top-endpoint-rank {
	font-family: Poppins;
	font-size: 1.5rem;
	font-weight: 800;
	min-width: 40px;
}

.top-endpoint-path {
	font-family: "JetBrains Mono";
	font-size: 13px;
	flex: 1;
	word-break: break-all;
}

.top-endpoint-total {
	font-family: Poppins;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--green-code);
}

/* Log Request */
.log-request {
	margin-top: 2rem;
}

.log-request h4 {
	font-size: 1.25rem;
	margin-bottom: 0.75rem;
}

#liveLogs {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

#liveLogs .log-card {
	flex: 1;
	min-width: 300px;
	padding: 1rem;
	border: 1px solid var(--shadow);
	background: var(--card);
	font-family: "JetBrains Mono";
}

.log-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.method {
	font-size: 12px;
	opacity: 0.7;
}

.log-top span {
	font-size: 13px;
}

.status {
	font-size: 13px;
	font-weight: bold;
}

.log-top .s-200 {
	color: var(--green-code);
}
.log-top .s-404 {
	color: var(--yellow-code);
}
.log-top .s-400 {
	color: var(--red-code);
}
.log-top .s-403 {
	color: var(--red-code);
}
.log-top .s-500 {
	color: var(--red-code);
}

.log-path {
	font-size: 15px;
	word-break: break-all;
	margin-bottom: 10px;
}

.log-bottom {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	opacity: 0.7;
	gap: 8px;
}

.log-latency {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 11px;
	opacity: 0.6;
	margin-top: 6px;
	gap: 10px;
}

/* Contributor */
.contributor-box {
	margin-top: 3rem;
}

.contributor-box h3 {
	font-size: 1.5rem;
}

.profile-contributor {
	display: flex;
	align-items: center;
	gap: 1rem;
	max-width: 14rem;
	text-decoration: none;
	color: inherit;
	border: 1px solid var(--shadow);
	padding: 1rem;
	background: var(--card);
	position: relative;
	overflow: hidden;
}

#ppContributor {
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	overflow: hidden;
	background: var(--shadow);
	position: relative;
	flex-shrink: 0;
}

#ppContributor img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: 0.4s ease;
}

#ppContributor img.loaded {
	opacity: 1;
}

.name-contributor h4 {
	margin: 0;
	font-size: 1rem;
}

.name-contributor p {
	margin: 0;
	font-size: 14px;
}

/* Footer */
.footer {
	margin-top: 2rem;
	margin-bottom: -2rem;
	border-top: 1px solid var(--shadow);
}

.footer h4 {
	font-size: 1.25rem;
}

.footer p {
	margin-left: 10px;
}

.footer-link {
	display: flex;
	flex-direction: column;
}

.footer-link a {
	margin-left: 10px;
	text-decoration: none;
	color: var(--paragraph);
	transition: 0.3s ease;
}

.footer-link a:hover {
	text-decoration: underline;
	opacity: 0.75;
}

.copyright {
	padding: 1rem;
	margin-top: 1rem;
	border-top: 1px solid var(--shadow);
	text-align: center;
}

/* Skeleton */
.skeleton {
	position: relative;
	overflow: hidden;
	background: var(--shadow);
	border-radius: 8px;
}

.skeleton::before {
	content: "";
	position: absolute;
	inset: 0;
	transform: translateX(-100%);
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.15),
		transparent
	);
	animation: shimmer 1.3s infinite;
}

@keyframes shimmer {
	100% {
		transform: translateX(100%);
	}
}

.hero-title-skeleton {
	width: 350px;
	height: 55px;
	margin-bottom: 1rem;
}

.hero-desc-skeleton {
	width: 280px;
	height: 18px;
}

.latency-skeleton {
	width: 80px;
	height: 35px;
	margin-top: 0.4rem;
}

.status-num-skeleton {
	width: 100%;
	height: 70px;
}

.country-num-skeleton {
	width: 100%;
	height: 80px;
}

.device-num-skeleton {
	width: 100%;
	height: 70px;
}

.top-endpoint-skeleton {
	width: 100%;
	height: 60px;
}

.avatar-skeleton {
	position: absolute;
	inset: 0;
}

.name-skeleton {
	width: 130px;
	height: 22px;
}

.commit-skeleton {
	width: 90px;
	height: 18px;
}

.hidden {
	display: none;
}

/* Responsive */
@media (max-width: 768px) {
	.nav-pc {
		display: none;
	}
	h2 {
		font-size: 2.3rem;
		line-height: 2.6rem;
	}
	.main {
		padding: 1.5rem;
	}

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

	.stat div:nth-child(1) {
		grid-column: span 2;
	}

	.stat div:nth-child(2),
	.stat div:nth-child(3) {
		grid-column: span 1;
	}

	.stat div:nth-child(4),
	.stat div:nth-child(5) {
		grid-column: span 1;
	}

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

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

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

	.top-endpoint-grid {
		grid-template-columns: 1fr;
	}

	#liveLogs .log-card {
		min-width: 100%;
	}
}

@media (max-width: 480px) {
	.stat {
		grid-template-columns: 1fr 1fr;
	}

	.stat div:nth-child(1) {
		grid-column: span 2;
	}

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

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

@media (min-width: 769px) {
	#hamburger {
		display: none;
	}
}

/* Admin Login */
.auth-hidden {
	display: none !important;
}

.admin-login-wrapper {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	background: var(--bg-color);
}

.admin-login-wrapper.auth-hidden {
	display: none !important;
}

.admin-login-card {
	width: 100%;
	max-width: 420px;
	padding: 2rem;
	border: 1px solid var(--shadow);
	background: var(--card);
	box-shadow: 0 0 10px var(--shadow);
}

.admin-login-icon {
	width: 3.2rem;
	height: 3.2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--shadow);
	background: var(--head-bg);
	margin-bottom: 1rem;
	font-size: 1.4rem;
}

.admin-login-card h2 {
	margin: 0 0 0.5rem;
	font-size: 2.3rem;
	line-height: 2.5rem;
}

.admin-login-card p {
	margin: 0 0 1.5rem;
}

.admin-login-card label {
	display: block;
	margin: 1rem 0 0.4rem;
	font-size: 14px;
	color: var(--paragraph);
}

.admin-login-card input {
	width: 100%;
	padding: 0.9rem 1rem;
	outline: none;
	border: 1px solid var(--shadow);
	background: var(--bg-color);
	color: var(--text-color);
	font-family: "JetBrains Mono";
	font-size: 14px;
	transition: 0.3s ease;
}

.admin-login-card input:focus {
	border-color: var(--true);
	box-shadow: 0 0 0 2px #28cd5c20;
}

.admin-login-message {
	min-height: 1.25rem;
	margin: 0.8rem 0;
	font-size: 14px;
	color: var(--red-code);
}

.admin-login-message.success {
	color: var(--true);
}

.admin-login-card button {
	width: 100%;
	padding: 0.95rem 1rem;
	background: var(--text-color);
	color: var(--bg-color);
	font-family: Rajdhani;
	font-size: 1rem;
	font-weight: 800;
	cursor: pointer;
	transition: 0.3s ease;
}

.admin-login-card button:hover {
	opacity: 0.85;
}

.admin-login-card button:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

@media (max-width: 600px) {
	.admin-login-wrapper {
		padding: 1rem;
	}

	.admin-login-card {
		padding: 1.5rem;
	}

	.admin-login-card h2 {
		font-size: 2rem;
		line-height: 2.2rem;
	}
}
