/**
 * Lewati - Stylesheet v4.0 (Modern UI/UX)
 * Author: Rizaldy Primanta Putra
 * Style: Sleek, Robust, Colorful, Intuitive
 */

/* =========================================
   VARIABLES & TOKENS
   ========================================= */
:root {
	/* Brand Colors */
	--brand-orange: #EE6123;
	--brand-orange-hover: #D4521B;
	--brand-blue: #0B1736;
	/* Bit.ly dark blue */

	/* Norton Trust Colors */
	--trust-green: #00B64F;
	--trust-green-dark: #008F3D;
	--trust-yellow: #FFD200;
	--trust-shield: #242424;

	/* Neturals */
	--bg-body: #F5F7FA;
	--surface-white: #FFFFFF;
	--surface-subtle: #F9FAFC;
	--text-main: #2C3E50;
	--text-muted: #7F8C8D;
	--border-light: #E1E8ED;

	/* Shadows (Modern & Sleek) */
	--shadow-card: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
	--shadow-input: 0 4px 12px rgba(0, 0, 0, 0.03);
	--shadow-orange: 0 8px 20px rgba(238, 97, 35, 0.3);
	--shadow-green: 0 8px 20px rgba(0, 182, 79, 0.25);

	/* Typography */
	--font-main: 'Poppins', sans-serif;
	--radius: 12px;
	--radius-pill: 50px;
}

/* =========================================
   GLOBAL RESET
   ========================================= */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: var(--font-main);
	background-color: var(--bg-body);
	color: var(--text-main);
	line-height: 1.6;
	overflow-x: hidden;
}

/* =========================================
   BACKGROUND GRAPHICS
   ========================================= */
.bg-pattern {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: -1;
	background-image:
		radial-gradient(circle at 15% 15%, rgba(238, 97, 35, 0.08) 0%, transparent 35%),
		radial-gradient(circle at 85% 85%, rgba(0, 182, 79, 0.08) 0%, transparent 35%);
}

/* =========================================
   LAYOUT
   ========================================= */
.container {
	max-width: 850px;
	margin: 0 auto;
	padding: 2rem 1.5rem;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* =========================================
   HEADER (Bit.ly Style)
   ========================================= */
.header {
	text-align: center;
	margin-bottom: 2.5rem;
	padding-top: 2rem;
}

.logo {
	font-size: 3.5rem;
	font-weight: 800;
	letter-spacing: -1px;
	background: linear-gradient(135deg, var(--brand-orange) 0%, #FF8F50 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	margin-bottom: 0.5rem;
	display: inline-block;
}

.tagline {
	font-size: 1.1rem;
	color: var(--text-muted);
	font-weight: 500;
}

/* =========================================
   MAIN CARD (Sleek Glass/Paper)
   ========================================= */
.main-card {
	background: var(--surface-white);
	border-radius: 24px;
	box-shadow: var(--shadow-card);
	padding: 3rem;
	position: relative;
	border: 1px solid rgba(255, 255, 255, 0.8);
	margin-bottom: 3rem;
	/* FIX for reordering: Enable Flexbox context */
	display: flex;
	flex-direction: column;
}

/* =========================================
   STATS BAR
   ========================================= */
.stats {
	display: flex;
	justify-content: center;
	gap: 2rem;
	margin-bottom: 2.5rem;
}

.stat-item {
	text-align: center;
	padding: 1rem 1.5rem;
	background: rgba(235, 239, 245, 0.5);
	/* Subtle glass bg */
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	transition: transform 0.2s;
}

.stat-item:hover {
	transform: translateY(-2px);
	background: rgba(255, 255, 255, 0.8);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.stat-number {
	font-size: 1.8rem;
	font-weight: 800;
	color: var(--brand-blue);
	line-height: 1;
}

.stat-label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--text-muted);
	font-weight: 600;
	margin-top: 0.25rem;
}

/* =========================================
   FORM & INPUT (Robust)
   ========================================= */
.bypass-form {
	display: flex;
	gap: 1rem;
	position: relative;
	margin-bottom: 2rem;
}

.input-wrapper {
	flex: 1;
	position: relative;
}

.url-input {
	width: 100%;
	padding: 1.25rem 1.5rem 1.25rem 3.5rem;
	font-size: 1.1rem;
	border: 2px solid var(--border-light);
	border-radius: var(--radius);
	background: var(--surface-subtle);
	color: var(--text-main);
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.url-input:focus {
	outline: none;
	background: var(--surface-white);
	border-color: var(--brand-orange);
	box-shadow: 0 0 0 4px rgba(238, 97, 35, 0.15);
}

.input-icon {
	position: absolute;
	left: 1.2rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-muted);
	pointer-events: none;
	transition: color 0.3s ease;
}

.url-input:focus~.input-icon {
	color: var(--brand-orange);
}

/* Button - Modern Gradient */
.bypass-btn {
	padding: 0 2.5rem;
	font-size: 1.1rem;
	font-weight: 700;
	color: white;
	background: linear-gradient(135deg, var(--brand-orange) 0%, #FF7A40 100%);
	border: none;
	border-radius: var(--radius);
	cursor: pointer;
	box-shadow: var(--shadow-orange);
	transition: transform 0.2s, box-shadow 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bypass-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(238, 97, 35, 0.4);
}

.bypass-btn:active {
	transform: translateY(0);
}

.bypass-btn:disabled {
	opacity: 0.7;
	cursor: wait;
}

/* =========================================
   SERVICES TAGS
   ========================================= */
.services-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	/* CSS Grid/Flex order to push to bottom if needed */
	width: 100%;
	order: 2;
	/* Default position */
}

.services-section.services-below {
	order: 10;
	/* Push to bottom when result is shown */
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border-light);
	animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.services-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text-muted);
	margin-bottom: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.services-tags {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
}

.service-tag {
	padding: 0.4rem 1rem;
	background: var(--surface-subtle);
	border: 1px solid var(--border-light);
	border-radius: var(--radius-pill);
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--text-muted);
	transition: all 0.2s ease;
	cursor: default;
}

.service-tag:hover {
	border-color: var(--brand-orange);
	color: var(--brand-orange);
	background: white;
	transform: translateY(-1px);
}

/* =========================================
   RESULT CARD (Norton SafeWeb Style)
   ========================================= */
.result-card {
	margin-top: 2rem;
	background: var(--surface-white);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
	border: 1px solid rgba(0, 0, 0, 0.05);
	animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
	/* Order management */
	width: 100%;
	order: 5;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.result-header {
	padding: 1.5rem 2rem;
	display: flex;
	align-items: center;
	gap: 1rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* SUCCESS STATE - Big Green Banner */
.result-header.success {
	background: linear-gradient(135deg, var(--trust-green) 0%, var(--trust-green-dark) 100%);
	color: white;
}

.result-icon {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(4px);
}

.result-title {
	font-weight: 700;
	font-size: 1.2rem;
	flex: 1;
}

.exec-time {
	font-size: 0.8rem;
	font-weight: 600;
	background: rgba(0, 0, 0, 0.2);
	padding: 0.3rem 0.8rem;
	border-radius: var(--radius-pill);
}

/* ERROR STATE */
.result-header.error {
	background: #FFF5F5;
	border-bottom: 2px solid #FED7D7;
}

.result-header.error .result-title {
	color: #C53030;
}

.result-header.error .result-icon {
	background: #FEB2B2;
	color: #C53030;
}


.result-body {
	padding: 2rem;
}

/* Info Grid */
.info-row {
	display: flex;
	margin-bottom: 1.2rem;
	align-items: center;
}

.info-row:last-child {
	margin-bottom: 0;
}

.info-label {
	width: 140px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text-muted);
	text-transform: uppercase;
}

.info-value {
	flex: 1;
	font-family: 'Roboto Mono', monospace;
	font-size: 0.95rem;
	color: var(--text-main);
	word-break: break-all;
	/* New Layout for Copy Button */
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.info-value a {
	color: var(--brand-orange);
	text-decoration: none;
	border-bottom: 1px dashed var(--brand-orange);
}

.info-value a:hover {
	border-bottom-style: solid;
}

/* Copy Button (Modern Pill Style) */
.copy-btn {
	padding: 0.3rem 0.8rem;
	font-family: var(--font-main);
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--brand-orange);
	background: rgba(238, 97, 35, 0.1);
	border: 1px solid rgba(238, 97, 35, 0.2);
	border-radius: 20px;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.copy-btn:hover {
	background: var(--brand-orange);
	color: white;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(238, 97, 35, 0.25);
}

.copy-btn:active {
	transform: translateY(0);
}

/* Preview Section */
.preview-section {
	margin-bottom: 2rem;
	border-radius: 12px;
	border: 1px solid var(--border-light);
	overflow: hidden;
	box-shadow: var(--shadow-input);
}

.preview-header {
	background: #F0F2F5;
	padding: 0.8rem 1rem;
	display: flex;
	gap: 6px;
	border-bottom: 1px solid var(--border-light);
}

.browser-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

.dot-red {
	background: #FF5F56;
}

.dot-yellow {
	background: #FFBD2E;
}

.dot-green {
	background: #27C93F;
}



/* Link Pills Container (Fix spacing) */
.link-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

/* Link Pills */
.link-pill {
	display: inline-block;
	/* Fallback */
	padding: 0.3rem 0.8rem;
	margin-right: 0.5rem;
	font-size: 0.8rem;
	font-weight: 600;
	border-radius: var(--radius-pill);
	text-decoration: none;
	background: var(--surface-subtle);
	color: var(--text-muted);
	border: 1px solid var(--border-light);
	transition: all 0.2s;
}

.link-pill:hover {
	background: var(--brand-blue);
	color: white;
	border-color: var(--brand-blue);
}

.link-pill.safety:hover {
	background: var(--trust-green);
	color: white;
	border-color: var(--trust-green);
}

/* =========================================
   FEATURES GRID (Bitly Style)
   ========================================= */
.features {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	/* Force 3 columns on desktop */
	gap: 1.5rem;
	margin-bottom: 3rem;
}

.feature-card {
	background: var(--surface-white);
	border-radius: 24px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
	transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
	border: 1px solid var(--border-light);
	cursor: pointer;
}

.feature-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
	border-color: rgba(238, 97, 35, 0.2);
}

/* Card Graphic Area */
.feature-graphic {
	height: 140px;
	/* Tall, premium graphic area */
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.3s ease;
}

/* Custom SVG Icons */
.feature-svg {
	width: 60px;
	height: 60px;
	filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.12));
	transition: transform 0.4s ease;
}

.feature-card:hover .feature-svg {
	transform: scale(1.1) rotate(5deg);
}

/* Card Content Area */
.feature-content {
	padding: 1.25rem 1.5rem 1.5rem;
}

.feature-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
	text-align: center;
}

.feature-title {
	font-size: 1.25rem;
	/* Larger title */
	font-weight: 800;
	color: var(--brand-blue);
	margin-bottom: 0;
}

/* Arrow Icon */
.arrow-icon {
	width: 20px;
	height: 20px;
	color: var(--brand-blue);
	transition: transform 0.3s ease;
}

.feature-card:hover .arrow-icon {
	transform: translateX(4px) translateY(-4px);
}

.feature-desc {
	font-size: 0.95rem;
	color: var(--text-muted);
	line-height: 1.5;
}

/* Individual Card Themes (Branded like Bitly) */
.feature-card:nth-child(1) .feature-graphic {
	background-color: #FFF1E8;
}

/* Orange/Fast */
.feature-card:nth-child(1) .feature-svg {
	color: var(--brand-orange);
}

.feature-card:nth-child(2) .feature-graphic {
	background-color: #E6F7F5;
}

/* Teal/Secure */
.feature-card:nth-child(2) .feature-svg {
	color: #00A3A3;
}

.feature-card:nth-child(3) .feature-graphic {
	background-color: #E8F0FE;
}

/* Blue/Free */
.feature-card:nth-child(3) .feature-svg {
	color: #2F80ED;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
	margin-top: auto;
	padding: 2rem 0;
	text-align: center;
	border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.footer-content {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	font-size: 0.9rem;
	color: var(--text-muted);
}

.footer-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 1rem;
	flex-wrap: wrap;
}

.footer-link {
	color: var(--text-muted);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	transition: color 0.2s;
}

.footer-link:hover {
	color: var(--brand-orange);
}

.footer a {
	color: var(--brand-orange);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s;
}

.footer a:hover {
	color: var(--brand-blue);
	text-decoration: underline;
}

.footer-developer {
	font-size: 0.85rem;
	opacity: 0.8;
}

.footer-version {
	font-size: 0.75rem;
	opacity: 0.5;
	font-family: monospace;
}

/* =========================================
   LOADING OVERLAY
   ========================================= */
.loading-overlay {
	text-align: center;
	padding: 3rem 0;
}

.spinner {
	width: 50px;
	height: 50px;
	border: 3px solid rgba(238, 97, 35, 0.2);
	border-radius: 50%;
	border-top-color: var(--brand-orange);
	animation: spin 0.8s ease-in-out infinite;
	margin: 0 auto 1rem;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
	.logo {
		font-size: 2.5rem;
	}

	.main-card {
		padding: 1.5rem;
	}

	.bypass-form {
		flex-direction: column;
	}

	.bypass-btn {
		width: 100%;
		padding: 1rem;
	}

	.info-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.3rem;
	}

	.info-label {
		width: 100%;
		margin-bottom: 0.2rem;
	}

	.copy-btn {
		margin-left: 0;
		margin-top: 0.5rem;
	}

	.features {
		grid-template-columns: 1fr;
		/* Stack on mobile/tablet */
		gap: 1.5rem;
	}

	.feature-card {
		padding: 1.5rem;
		/* Smaller padding */
	}

	.stats {
		flex-wrap: wrap;
		gap: 1rem;
	}

	.stat-item {
		width: calc(33.33% - 0.7rem);
		/* 3 items per row on tablet */
		min-width: 80px;
	}
}

@media (max-width: 480px) {
	.logo {
		font-size: 2rem;
	}

	.container {
		padding: 1rem;
	}

	.main-card {
		padding: 1.25rem;
		border-radius: 16px;
	}

	.stats {
		justify-content: space-between;
	}

	.stat-item {
		width: 100%;
		/* Stack stats on very small screens */
		background: var(--surface-subtle);
		border-radius: var(--radius);
	}

	.stat-number {
		font-size: 1.5rem;
	}
}

