:root {
	--backdrop: hsl(0 0% 60% / 0.15);
	--radius: 24px;
	--border-size: 1px;
	--spotlight-size: 150px;
	--hue: 210;
	--saturation: 100;
	--lightness: 70;
	--bg-spot-opacity: 0.1;
	--border-spot-opacity: 1;
	--border-light-opacity: 1;
	--card-height: 622px;
	--card-width: 350px;
	--card-aspect-ratio: 9 / 16;

	/* Glass effect colors */
	/* --glass-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%); */
	--glass-bg: linear-gradient(
		180deg,
		rgb(30, 30, 30) 0%,
		rgb(15, 15, 15) 100%
	);
	--glass-border: rgba(255, 255, 255, 0.16);
	--glass-shadow: inset 0px 4px 80px 0px rgba(255, 255, 255, 0.12);
}

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

/* Remove mobile tap highlights and focus outlines for cleaner animations */
*:focus {
	outline: none;
}

button,
a,
[role="button"] {
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	outline: none;
}

body {
	font-family: "Philosopher", serif;
	background: #000;
	color: white;
	height: 100vh;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.container {
	position: relative;
	perspective: 960px;
	z-index: 1;
}

.touch-instruction {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.32);
	font-family: "Philosopher", serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.12;
	text-align: center;
	width: 170px;
	height: 18px;
	opacity: 0;
	animation: fadeInInstruction 0.6s ease-out 3.5s forwards;
	pointer-events: none;
}

.neuro-canvas {
	position: absolute;
	top: 50%;
	left: 50%;
	width: var(--card-width);
	aspect-ratio: var(--card-aspect-ratio);
	transform: translate(-50%, -50%);
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease, z-index 0s, filter 0.3s ease;
	border-radius: var(--radius);
	z-index: 3;
	background: transparent;
	filter: blur(0px);
}

.neuro-canvas.active {
	opacity: 0.8;
}

.neuro-canvas.clicked {
	z-index: -1;
	filter: blur(24px);
}

.card {
	position: relative;
	width: var(--card-width);
	aspect-ratio: var(--card-aspect-ratio);
	transform-style: preserve-3d;
	transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	cursor: pointer;
	margin: 20px;
	will-change: transform;
	z-index: 1;
	outline: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.card.flipped {
	transform: rotateY(180deg) !important;
}

.card-face {
	position: absolute;
	width: 100%;
	height: 100%;
	backface-visibility: hidden;
	border-radius: var(--radius);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}

.card-front {
	background: #000000;
	border: 1px solid #333;
	position: relative;
	overflow: hidden;
}

.card-front::before {
	content: "";
	position: absolute;
	top: -1px;
	left: -1px;
	right: -1px;
	bottom: -1px;
	border-radius: var(--radius);
	background: radial-gradient(
		200px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
		rgba(255, 255, 255, 0.8),
		rgba(100, 200, 255, 0.4),
		transparent 70%
	);
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
	transform: translateZ(0);
}

.card-front::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	right: 2px;
	bottom: 2px;
	background: #000000;
	border-radius: var(--radius);
	z-index: 1;
	pointer-events: none;
}

.card-front:hover::before {
	opacity: 1;
}

.card-back {
	top: 0px;
	z-index: 10;
	background: #000000;
	border: var(--border-size) solid var(--glass-border);
	backdrop-filter: blur(10px);
	box-shadow: var(--glass-shadow);
	transform: rotateY(180deg);
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 32px;
}

.holographic-logo {
	box-shadow: inset 0 0 16px black;
	position: relative;
	z-index: 2;
}

.logo-video {
	width: 100%;
	max-width: 160px;
	height: auto;
	transition: all 0.1s ease-out;
	object-fit: contain;
	filter: saturate(0.3) brightness(0.8);
}

.logo-video:hover {
	transform: scale(1.05);
	filter: saturate(1) brightness(1);
}

.logo-text.fallback {
	font-size: 3.5rem;
	font-weight: bold;
	background: linear-gradient(45deg, #00ff00, #ff0000, #00ff00, #ff0000);
	background-size: 400% 400%;
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
	animation: holographicText 2.5s ease-in-out infinite;
	text-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
	letter-spacing: 0.1em;
	position: relative;
	display: none;
}

.logo-text.fallback::after {
	content: "GÆISHÆ";
	position: absolute;
	top: 0;
	left: 0;
	background: linear-gradient(45deg, #ff0000, #00ff00, #ff0000, #00ff00);
	background-size: 400% 400%;
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
	animation: holographicText 2.5s ease-in-out infinite reverse;
	opacity: 0.7;
	transform: translate(2px, 2px);
}

.card-content {
	text-align: center;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 32px;
	align-items: center;
}

.top-block {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: 188px;
}

.geashae-img {
	width: 180px;
	height: 180px;
	border-radius: 8px;
	background-image: url("images/geashae_img.png");
	background-size: cover;
	background-position: center;
	flex-shrink: 0;
}

.card-content h2 {
	font-family: "Philosopher", serif;
	font-size: 24px;
	font-weight: 400;
	line-height: 1.12;
	margin-bottom: 0;
	color: #ffffff;
	text-align: center;
}

.card-content p {
	font-family: "Philosopher", serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.12;
	margin-bottom: 0;
	background: linear-gradient(
		90deg,
		#a86642 0%,
		#97466a 50.52%,
		#3b7685 67.66%,
		#57815d 83.4%,
		#997549 100%
	);
	background-clip: text;
	-webkit-background-clip: text;
	color: transparent;
	text-align: center;
}

.action-buttons {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	align-items: stretch;
}

.btn {
	padding: 16px 32px;
	background: var(--glass-bg);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 80px;
	font-family: "Inter", sans-serif;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.2;
	cursor: pointer;
	transition: all 0.1s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-decoration: none;
	color: white;
}

.btn:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: scale(1.02);
}

.btn-primary {
	color: #ffdcbe;
	text-shadow: 0px 0px 15px rgba(255, 122, 8, 1);
}

.btn-secondary {
	color: #ffcae4;
	text-shadow: 0px 0px 15px rgba(255, 83, 167, 1);
}

.btn-tertiary {
	color: #b9faff;
	text-shadow: 0px 0px 15px rgba(107, 193, 255, 1);
}

.btn .icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

/* Social Icons */
.social-icons {
	display: flex;
	justify-content: center;
	gap: 16px;
	width: 100%;
	margin-top: 8px;
}

.social-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	opacity: 0.32;
	transition: opacity 0.3s ease, transform 0.2s ease;
	text-decoration: none;
}

.social-icon:hover {
	opacity: 1;
	transform: scale(1.05);
}

.social-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Portfolio Modal Styles */
.portfolio-content {
	max-width: 95vw;
	max-height: 95vh;
	width: 90vw;
	height: auto;
	padding: 20px;
	margin: 2.5vh auto;
}

.portfolio-content h3 {
	text-align: center;
	margin-bottom: 20px;
	font-family: "Philosopher", serif;
	color: white;
}

/* Portfolio Slider */
.keen-slider {
	height: 80vh;
	max-height: 80vh;
	border-radius: 12px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.3);
}

.keen-slider__slide {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	min-height: 500px;
	background: rgba(0, 0, 0, 0.2);
}

.keen-slider__slide img,
.keen-slider__slide video {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 8px;
}

.loading-slide {
	display: flex;
	align-items: center;
	justify-content: center;
}

.loader {
	color: rgba(255, 255, 255, 0.8);
	font-family: "Inter", sans-serif;
	animation: pulse 2s ease-in-out infinite;
}

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

/* Slider Controls */
.slider-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-top: -43px;
	padding-bottom: 8px;
	z-index: 2;
	position: inherit;
	flex-direction: row;
	right: 0px;
	left: 0px;
	bottom: 0px;
}

.slider-btn {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	color: white;
	font-size: 20px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.slider-btn:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: scale(1.1);
}

.slider-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
	transform: none;
}

.slide-counter {
	color: rgba(255, 255, 255, 0.8);
	font-family: "Inter", sans-serif;
	font-size: 14px;
	min-width: 60px;
	text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.portfolio-content {
		max-width: 98vw;
		max-height: 98vh;
		width: 95vw;
		margin: 1vh auto;
		padding: 15px;
	}

	.keen-slider {
		height: 75vh;
		max-height: 75vh;
	}

	.keen-slider__slide {
		min-height: 400px;
	}

	.slider-btn {
		width: 35px;
		height: 35px;
		font-size: 18px;
	}

	.slide-counter {
		font-size: 12px;
		min-width: 50px;
	}

	.close {
		top: 10px;
		right: 15px;
		font-size: 30px;
		width: 40px;
		height: 40px;
	}
}

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
	.portfolio-content {
		max-height: 95vh;
		max-width: 95vw;
		width: 90vw;
		margin: 2.5vh auto;
	}

	.keen-slider {
		height: 70vh;
		max-height: 70vh;
	}

	.keen-slider__slide {
		min-height: 300px;
	}

	.close {
		top: 8px;
		right: 12px;
		font-size: 28px;
		width: 36px;
		height: 36px;
	}

	.slider-controls {
		margin-top: 15px;
		gap: 15px;
	}

	.portfolio-content h3 {
		margin-bottom: 15px;
		font-size: 20px;
	}
}

/* Tablet Landscape and larger screens */
@media (min-width: 769px) and (max-height: 600px) {
	.portfolio-content {
		max-height: 95vh;
		width: 85vw;
		margin: 2.5vh auto;
	}

	.keen-slider {
		height: 75vh;
		max-height: 75vh;
	}

	.close {
		top: 12px;
		right: 18px;
	}
}

/* Modal Styles */
.modal {
	display: none;
	position: fixed;
	z-index: 10000;
	left: 0;
	top: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.85);
	backdrop-filter: blur(12px);
	overflow-y: auto;
}

.modal-content {
	background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
	margin: 2.5vh auto;
	padding: 4px;
	position: relative;
	box-sizing: border-box;
	border-radius: 15px;
	width: 90%;
	max-width: 1024px;
	max-height: fit-content;
	border: 2px solid rgba(255, 255, 255, 0.1);
	position: relative;
	animation: modalSlideIn 0.3s ease-out;
}

.close {
	position: absolute;
	top: 15px;
	right: 20px;
	font-size: 36px;
	font-weight: bold;
	color: rgba(255, 255, 255, 0.7);
	cursor: pointer;
	transition: all 0.3s ease;
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.3);
	z-index: 10001;
}

.close:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
	transform: scale(1.1);
}

.modal-content h3 {
	margin-bottom: 20px;
	color: #00ff00;
	text-align: center;
}

.form-group {
	margin-bottom: 15px;
}

.form-group label {
	display: block;
	margin-bottom: 5px;
	color: #ccc;
	font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 5px;
	background: rgba(255, 255, 255, 0.1);
	color: white;
	font-size: 1rem;
	transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
	outline: none;
	border-color: #00ff00;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
	color: #888;
}

.sound-toggle {
	position: fixed;
	top: 20px;
	right: 20px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	width: 50px;
	height: 50px;
	font-size: 20px;
	cursor: pointer;
	transition: all 0.3s ease;
	backdrop-filter: blur(10px);
	z-index: 9999;
}

.sound-toggle.muted {
	opacity: 0.5;
}

.lang-toggle {
	position: fixed;
	bottom: 20px;
	left: 20px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	width: 50px;
	height: 50px;
	font-size: 20px;
	cursor: pointer;
	transition: all 0.3s ease;
	backdrop-filter: blur(10px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.sound-toggle:hover .lang-toggle:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: scale(1.1);
}

/* Animations */
@keyframes holographicShift {
	0%,
	100% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
}

@keyframes holographicText {
	0%,
	100% {
		background-position: 0% 50%;
		transform: scale(1);
	}
	25% {
		background-position: 25% 50%;
		transform: scale(1.02);
	}
	50% {
		background-position: 100% 50%;
		transform: scale(1);
	}
	75% {
		background-position: 75% 50%;
		transform: scale(1.02);
	}
}

@keyframes shimmer {
	0% {
		left: -100%;
	}
	100% {
		left: 100%;
	}
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: translateY(-50px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes fadeInInstruction {
	from {
		opacity: 0;
		transform: translateX(-50%) translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateX(-50%) translateY(0);
	}
}

/* Responsive */
@media (max-width: 768px) {
	.card {
		margin: 15px;
	}

	.modal-content {
		margin: 8% auto;
		padding: 4px;
	}

	.touch-instruction {
		font-size: 16px;
	}
}

@media (max-width: 500px) {
	.card {
		margin: 10px;
	}

	.sound-toggle {
		width: 40px;
		height: 40px;
		font-size: 16px;
	}

	.lang-toggle {
		width: 40px;
		height: 40px;
		font-size: 16px;
	}

	.modal-content {
		margin: 10% auto;
		padding: 4px;
		width: 95%;
	}

	.logo-video {
		filter: saturate(0.8) brightness(0.9);
	}
}

@media (max-width: 391px) {
	.card {
		width: calc(100vw - 32px);
		margin: 8px;
	}

	.neuro-canvas {
		width: calc(100vw - 32px);
	}

	.logo-text.fallback {
		font-size: 1.8rem;
	}
}

/* Glitch effect on hover */
.card:hover .logo-text.fallback {
	animation: glitch 0.5s ease-in-out;
}

@keyframes glitch {
	0%,
	100% {
		transform: translate(0);
	}
	20% {
		transform: translate(-2px, 2px);
	}
	40% {
		transform: translate(-2px, -2px);
	}
	60% {
		transform: translate(2px, 2px);
	}
	80% {
		transform: translate(2px, -2px);
	}
}
