/*--------------------------------------------------------------
 Nine Worlds Landing Page - style.css
--------------------------------------------------------------*/

/*==============================*/
/* = GLOBAL LAYOUT = */
/*==============================*/

html, body {
	margin: 0;
	padding: 0;
	font-family: 'Alice', serif;
	color: #E6D5B3;
	height: 100%;
	overflow-x: hidden;
	background-color: #000;
}

.container {
	margin-top: 5%;
	text-align: center;
	width: 100%;
	padding: 0 20px;
	box-sizing: border-box;
	position: relative;
	z-index: 2;
}

/*==============================*/
/* = BACKGROUND & STARS = */
/*==============================*/

.background-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url('../assets/nineworlds_background.png') no-repeat center center;
	background-size: cover;
	pointer-events: none;
	z-index: 0;
}

/* Home page background animation */
body.home-page .background-container {
	animation: backgroundZoomOut 3s ease-in-out forwards;
}

.starry-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 1;
}

.star {
	position: absolute;
	background: #b3e0ff;
	border-radius: 50%;
	animation: simpleBlueTwinkle 3s infinite ease-in-out;
	opacity: 0;
	animation-fill-mode: both;
}

@keyframes simpleBlueTwinkle {
	0%, 100% {
		opacity: 0.3;
		background: #99d6ff;
	}
	50% {
		opacity: 0.9;
		background: #cceeff;
	}
}

.star.large {
	width: 4px;
	height: 4px;
	animation-duration: 4s;
	animation-delay: 0.5s;
}

.star.medium {
	width: 3px;
	height: 3px;
	animation-duration: 3.5s;
	animation-delay: 0.3s;
}

.star.small {
	width: 2px;
	height: 2px;
	animation-duration: 3s;
	animation-delay: 0.1s;
}

/*==============================*/
/* = PERSISTENT ELEMENTS = */
/*==============================*/

/* Nine Worlds title - always visible with glow */
h1 {
	font-size: 5rem;
	margin: 0;
	color: #fff;
	animation: glowIdle 4s ease-in-out infinite;
}

/* Buttons - always visible */
.button-row {
	display: flex;
	justify-content: center;
	gap: 30px;
	margin-bottom: 1em;
}

.btn {
	background: none;
	border: none;
	color: #E6D5B3;
	font-weight: bold;
	font-size: 1.2rem;
	text-decoration: none;
	transition: transform 0.2s, color 0.3s;
}

.btn:hover {
	color: #ffffff;
	transform: scale(1.15);
}

/* Music player - always visible */
.music-container {
	margin: 1.5em auto;
}

.music-player {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 15px;
}

.music-btn {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	color: #E6D5B3;
	cursor: pointer;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: all 0.3s ease;
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0% { box-shadow: 0 0 0 0 rgba(230, 213, 179, 0.4); }
	70% { box-shadow: 0 0 0 10px rgba(230, 213, 179, 0); }
	100% { box-shadow: 0 0 0 0 rgba(230, 213, 179, 0); }
}

.volume-control {
	width: 100px;
	-webkit-appearance: none;
	height: 5px;
	border-radius: 5px;
	background: rgba(230, 213, 179, 0.3);
	outline: none;
}

.volume-control::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: #E6D5B3;
	cursor: pointer;
}

/*==============================*/
/* = HOME PAGE ANIMATIONS = */
/*==============================*/

/* Home page elements animate in with delays */
body.home-page h1 {
	opacity: 0;
	animation: fadeSlideIn 1s ease forwards, glowIdle 4s ease-in-out infinite;
	animation-delay: 0.8s, 0.8s;
}

body.home-page #page-subtitle {
	opacity: 0;
	animation: subtitleAppear 1.2s ease-out forwards, glowIdle 6s ease-in-out infinite;
	animation-delay: 2.2s, 2.2s;
}

body.home-page .button-row {
	opacity: 0;
	animation: fadeSlideIn 1s ease forwards;
	animation-delay: 1.6s;
}

body.home-page .music-container {
	opacity: 0;
	animation: fadeSlideIn 1s ease forwards;
	animation-delay: 2s;
}

body.home-page #content-area .description {
	opacity: 0;
	animation: fadeSlideIn 1s ease forwards;
	animation-delay: 2.4s;
}

body.home-page #content-area .description-server {
	opacity: 0;
	animation: fadeSlideIn 1s ease forwards;
	animation-delay: 2.6s;
}

body.home-page #content-area .banner {
	opacity: 0;
	animation: fadeSlideIn 1s ease forwards;
	animation-delay: 2.8s;
}

body.home-page .discord-btn {
	opacity: 0;
	animation: fadeSlideIn 1s ease forwards;
	animation-delay: 3s;
}

/*==============================*/
/* = PAGE TRANSITION ANIMATIONS = */
/*==============================*/

/* Other pages - only animate subtitle and content */
body.other-page #page-subtitle,
body.other-page #content-area .description,
body.other-page #content-area .description-server,
body.other-page #content-area .banner,
body.other-page .discord-btn {
	opacity: 0;
	transform: translateY(20px);
	animation: fadeSlideIn 0.6s ease forwards;
}

/* Stagger the animations for page transitions */
body.other-page #page-subtitle {
  opacity: 0;
  animation: subtitleAppear 0.8s ease-out forwards;
  animation-delay: 0.1s;
}
body.other-page #content-area .description { animation-delay: 0.2s; }
body.other-page #content-area .description-server { animation-delay: 0.3s; }
body.other-page #content-area .banner { animation-delay: 0.4s; }
body.other-page .discord-btn { animation-delay: 0.5s; }

/*==============================*/
/* = CONTENT STYLES = */
/*==============================*/

#page-subtitle {
	font-size: 2.5rem;
	font-weight: normal;
	margin-bottom: 1em;
	color: #fff;
}

.description, .description-server, .banner {
	width: 70%;
	max-width: 700px;
	margin: 0 auto 1.5em;
	background: rgba(230, 213, 179, 0.05);
	border: 1px solid rgba(230, 213, 179, 0.3);
	border-radius: 12px;
	padding: 18px;
	font-size: 1.05rem;
	line-height: 1.5em;
	text-align: left;
	box-sizing: border-box;
}

.banner { 
	padding: 10px; 
}

.banner img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}

.discord-btn {
	display: inline-block;
	margin: 30px auto 50px;
	background: rgba(90, 140, 200, 0.3);
	color: #ffffff;
	padding: 12px 30px;
	border-radius: 20px;
	font-size: 1.2rem;
	font-weight: bold;
	text-decoration: none;
	transition: transform 0.2s, background 0.3s;
}

.discord-btn:hover {
	background: rgba(90, 140, 200, 0.6);
	transform: scale(1.1);
}

/*==============================*/
/* = ANIMATION KEYFRAMES = */
/*==============================*/

@keyframes subtitleAppear {
  0% {
    opacity: 0;
    transform: scale(1.3);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    filter: blur(5px);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.9);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    filter: blur(0);
  }
}

@keyframes fadeSlideIn {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes backgroundZoomOut {
	0% {
		transform: scale(1.15);
		opacity: 0;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes glowIdle {
	0%, 100% { text-shadow: 0 0 8px rgba(255,255,255,0.3); }
	50% { text-shadow: 0 0 16px rgba(255,255,255,0.6); }
}

/*==============================*/
/* = MOBILE STYLES = */
/*==============================*/

@media (max-width: 1024px) {
	.background-container {
		background-size: cover;
	}
	h1 { font-size: 3rem; }
	#page-subtitle { font-size: 1.8rem; }
	.description, .description-server, .banner { width: 90%; }
}

@media (max-width: 600px) {
	h1 { font-size: 2.4rem; }
	#page-subtitle { font-size: 1.4rem; }
	.button-row { flex-direction: column; gap: 12px; }
	.btn { font-size: 1rem; }
	.music-player { flex-direction: column; gap: 10px; }
	.volume-control { width: 80%; }
}