/* ============================================
   SHARED CSS - Common styles across all pages
   ============================================ */

/* RESET & BASE STYLES */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: #fff;
	min-height: 100vh;
	position: relative;
	overflow-x: hidden;
}

/* ANIMATED GRADIENT TEXT */
h1 {
	font-family: 'Poppins', sans-serif;
	font-size: 3rem;
	text-align: center;
	background: linear-gradient(to right, #fc72ff, #8f68ff, #487bff, #8f68ff, #fc72ff);
	background-size: 200%;
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: animate-gradient 2.5s linear infinite;
}

@keyframes animate-gradient {
	to {
		background-position: 200%;
	}
}

/* NAVIGATION BAR */
.nav-bar {
	position: fixed;
	z-index: 100;
	top: 2rem;
	left: 0;
	right: 0;
	margin: 0 auto;
	width: fit-content;
	background: rgba(255, 255, 255, 0.1);
	border: 0.1rem solid rgba(255, 255, 255, 0.2);
	border-radius: 2rem;
	padding: 0.75rem 1.5rem;
	display: flex;
	gap: 1.25rem;
	backdrop-filter: blur(10px);
	font-size: 1rem;
}

.nav-item {
	position: relative;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	padding: 0.5rem;
	border-radius: 1rem;
	overflow: hidden;
	white-space: nowrap;
}

.nav-item:hover {
	background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
	width: 1.5rem;
	height: 1.5rem;
	opacity: 0.7;
	transition: opacity 0.2s;
	flex-shrink: 0;
}

.nav-item:hover .nav-icon {
	opacity: 1;
}

.nav-label {
	margin-left: 8px;
	font-size: 1rem;
	font-weight: 500;
	opacity: 0;
	transform: translateX(-10px);
	transition: all 0.35s ease-in;
	max-width: 0;
	overflow: hidden;
}

.nav-item:hover .nav-label {
	opacity: 1;
	transform: translateX(0);
	max-width: 100px;
}

/* STAR SYSTEM */
.star {
	position: fixed;
	background: white;
	border-radius: 50%;
	opacity: 0;
	transition: opacity 1s ease;
	pointer-events: none;
	z-index: 1;
	animation: twinkle linear infinite;
}

.star.visible {
	opacity: 0.8;
}

.star.static {
	animation: none !important;
}

.star.static.visible {
	opacity: 0.7;
}

.star.shooting {
	opacity: 1 !important;
	border-radius: 50% !important;
	transform-origin: center;
	background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.9) 20%, rgba(255, 255, 255, 0.3) 60%, rgba(255, 255, 255, 0) 100%) !important;
	box-shadow: 0 0 6px rgba(255, 255, 255, 0.8), 0 0 12px rgba(255, 255, 255, 0.6), 0 0 18px rgba(255, 255, 255, 0.4);
}

.star.shooting::before {
	content: '';
	position: absolute;
	width: 80px;
	height: 2px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 10%, rgba(255, 255, 255, 0.3) 30%, rgba(255, 255, 255, 0.6) 70%, rgba(255, 255, 255, 0.9) 100%);
	top: 50%;
	right: 100%;
	transform: translateY(-50%);
	border-radius: 1px;
}

.star.shooting::after {
	content: '';
	position: absolute;
	width: 40px;
	height: 1px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 30%, rgba(255, 255, 255, 0.5) 70%, rgba(255, 255, 255, 0.8) 100%);
	top: 50%;
	right: 100%;
	transform: translateY(-50%);
	border-radius: 0.5px;
}

@keyframes twinkle {
	0%,
	100% {
		opacity: 0.3;
	}

	50% {
		opacity: 1;
	}
}

@keyframes subtle-fade {
	0%,
	100% {
		opacity: 0.6;
	}

	50% {
		opacity: 0.8;
	}
}

@keyframes shoot-down-right {
	0% {
		opacity: 0;
		transform: rotate(45deg) translate(-50px, 0) scale(0.5);
		filter: brightness(0.8);
	}

	20% {
		opacity: 1;
		transform: rotate(45deg) translate(100px, 0) scale(1.2);
		filter: brightness(1.2);
	}

	40% {
		opacity: 1;
		transform: rotate(45deg) translate(200px, 0) scale(1.8);
		filter: brightness(1.8);
	}

	60% {
		opacity: 1;
		transform: rotate(45deg) translate(320px, 0) scale(2.2);
		filter: brightness(2);
	}

	80% {
		opacity: 1;
		transform: rotate(45deg) translate(420px, 0) scale(1.2);
		filter: brightness(1.2);
	}

	100% {
		opacity: 0;
		transform: rotate(45deg) translate(500px, 0) scale(0.5);
		filter: brightness(0.8);
	}
}

@keyframes shoot-down-left {
	0% {
		opacity: 0;
		transform: rotate(-45deg) translate(-50px, 0) scale(0.5);
		filter: brightness(0.8);
	}

	20% {
		opacity: 1;
		transform: rotate(-45deg) translate(100px, 0) scale(1.2);
		filter: brightness(1.2);
	}

	40% {
		opacity: 1;
		transform: rotate(-45deg) translate(200px, 0) scale(1.8);
		filter: brightness(1.8);
	}

	60% {
		opacity: 1;
		transform: rotate(-45deg) translate(320px, 0) scale(2.2);
		filter: brightness(2);
	}

	80% {
		opacity: 1;
		transform: rotate(-45deg) translate(420px, 0) scale(1.2);
		filter: brightness(1.2);
	}

	100% {
		opacity: 0;
		transform: rotate(-45deg) translate(500px, 0) scale(0.5);
		filter: brightness(0.8);
	}
}

@keyframes shoot-up-right {
	0% {
		opacity: 0;
		transform: rotate(135deg) translate(-50px, 0) scale(0.5);
		filter: brightness(0.8);
	}

	20% {
		opacity: 1;
		transform: rotate(135deg) translate(100px, 0) scale(1.2);
		filter: brightness(1.2);
	}

	40% {
		opacity: 1;
		transform: rotate(135deg) translate(200px, 0) scale(1.8);
		filter: brightness(1.8);
	}

	60% {
		opacity: 1;
		transform: rotate(135deg) translate(320px, 0) scale(2.2);
		filter: brightness(2);
	}

	80% {
		opacity: 1;
		transform: rotate(135deg) translate(420px, 0) scale(1.2);
		filter: brightness(1.2);
	}

	100% {
		opacity: 0;
		transform: rotate(135deg) translate(500px, 0) scale(0.5);
		filter: brightness(0.8);
	}
}

@keyframes shoot-up-left {
	0% {
		opacity: 0;
		transform: rotate(-135deg) translate(-50px, 0) scale(0.5);
		filter: brightness(0.8);
	}

	20% {
		opacity: 1;
		transform: rotate(-135deg) translate(100px, 0) scale(1.2);
		filter: brightness(1.2);
	}

	40% {
		opacity: 1;
		transform: rotate(-135deg) translate(200px, 0) scale(1.8);
		filter: brightness(1.8);
	}

	60% {
		opacity: 1;
		transform: rotate(-135deg) translate(320px, 0) scale(2.2);
		filter: brightness(2);
	}

	80% {
		opacity: 1;
		transform: rotate(-135deg) translate(420px, 0) scale(1.2);
		filter: brightness(1.2);
	}

	100% {
		opacity: 0;
		transform: rotate(-135deg) translate(500px, 0) scale(0.5);
		filter: brightness(0.8);
	}
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
	.nav-bar {
		left: 20px;
		right: 20px;
		width: auto;
	}
}

/* --- Chat Bubble Button --- */
.chat-bubble-btn {
    position: fixed;
    bottom: 20px;
    left: 20px; /* Anchors it to the bottom left */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #6366f1; /* Modern purple/blue */
    color: white;
    font-size: 24px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1000; /* Keeps it on top of other elements */
}

/* --- Chat Window Container --- */
.chat-window {
    position: fixed;
    bottom: 90px; /* Sits right above the bubble */
    left: 20px;
    width: 320px;
    height: 400px;
    background-color: #1e1e1e; /* Dark mode styling */
    color: white;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    font-family: sans-serif;
}

/* Utility class to hide the window */
.hidden {
    display: none !important;
}

/* --- Internal Chat Window Styling --- */
.chat-header {
    background-color: #3b3b3b;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto; /* Adds scrollbar if messages get too long */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px;
    border-radius: 8px;
    max-width: 80%;
    word-wrap: break-word;
}

.bot-message {
    background-color: #3b3b3b;
    align-self: flex-start; /* Aligns bot messages to the left */
}

.user-message {
    background-color: #6366f1;
    align-self: flex-end; /* Aligns your messages to the right */
}

.chat-input-area {
    display: flex;
    padding: 10px;
    background-color: #2d2d2d;
}

#chat-input {
    flex-grow: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    outline: none;
}

#send-btn {
    background-color: #6366f1;
    color: white;
    border: none;
    padding: 10px 15px;
    margin-left: 10px;
    border-radius: 6px;
    cursor: pointer;
}