/* -----------------------------
   Base Layout
------------------------------ */

body {
	margin: 0;
	font-family: "Segoe UI", sans-serif;
	background: linear-gradient(135deg, #fceff9, #e0f7fa);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	overflow-x: hidden;
}

.container {
	text-align: center;
	max-width: 900px;
	padding: 40px 20px;
	z-index: 1;
}

/* -----------------------------
   Top Logo Bar
------------------------------ */

.top-bar {
	position: fixed;
	top: 15px;
	left: 20px;
	z-index: 2;
}

.logo {
	width: 120px;
	height: auto;
	opacity: 0.9;
	transition: transform 0.3s ease;
}

.logo:hover {
	transform: scale(1.05);
}

/* -----------------------------
   Title
------------------------------ */

.site-title {
	font-size: 30px;
	margin-bottom: 40px;
	color: #333;
	font-weight: 600;
}

/* -----------------------------
   Guide Section
------------------------------ */

.guide-section {
	margin-bottom: 50px;
}

.guide {
	width: 200px;
	margin-bottom: 20px;
}

.speech-bubble {
	background: white;
	padding: 22px;
	border-radius: 25px;
	box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
	max-width: 420px;
	margin: 0 auto;
	font-size: 18px;
	line-height: 1.5;
	color: #333;
}

/* -----------------------------
   Navigation Cards
------------------------------ */

.menu {
	display: flex;
	justify-content: center;
	gap: 18px;
	flex-wrap: nowrap;
}

.card {
	text-decoration: none;
	background: #ffd1dc;
	padding: 16px 24px;
	border-radius: 40px;
	color: #333;
	font-weight: 600;
	transition: all 0.25s ease;
	flex: 1;
	text-align: center;
}

.card:hover {
	background: #ffb3c6;
	transform: translateY(-2px);
}

.subtitle {
	margin-top: -20px;
	margin-bottom: 30px;
	color: #555;
	font-size: 26px;
}

/* -----------------------------
   Footer
------------------------------ */

.footer {
	margin-top: auto;
	padding: 15px 0;
	font-size: 14px;
	color: #555;
}

/* -----------------------------
   Static Stars Background
------------------------------ */

.stars {
	position: fixed;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 0;
}

.stars span {
	position: absolute;
	color: black;
	font-size: 36px;
	opacity: 0.18;
}

.emotion-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 15px;
	margin: 40px 0;
}

.emotion-btn {
	background: #ffe4ec;
	border: none;
	padding: 12px 20px;
	border-radius: 25px;
	cursor: pointer;
	transition: 0.2s ease;
	font-weight: 600;
}

.emotion-btn:hover {
	background: #ffd1dc;
}

.popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.3);
	display: flex;
	justify-content: center;
	align-items: center;
}

.hidden {
	display: none;
}

.popup-content {
	background: white;
	padding: 30px;
	border-radius: 20px;
	max-width: 400px;
	text-align: center;
}

.close-btn {
	float: right;
	cursor: pointer;
	font-size: 22px;
}

.emotion-info {
	margin-top: 50px;
	text-align: left;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}

/* -----------------------------
   Clean Pie Wheel
------------------------------ */

.emotion-wheel {
	position: relative;
	width: 320px;
	height: 320px;
	margin: 60px auto;
	border-radius: 50%;
	background: conic-gradient(
		#ffe066 0deg 60deg,
		#ffd6a5 60deg 120deg,
		#a0c4ff 120deg 180deg,
		#ff6b6b 180deg 240deg,
		#bdb2ff 240deg 300deg,
		#b7e4c7 300deg 360deg
	);
}

.emotion-wheel::after {
	content: "";
	position: absolute;
	width: 120px;
	height: 120px;
	background: white;
	border-radius: 50%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.labels {
	position: absolute;
	width: 100%;
	height: 115%;
}

.label {
	position: absolute;
	background: transparent;
	border: none;
	font-weight: 600;
	cursor: pointer;
	color: #333;
	font-size: 16px;
}

.joy {
	top: 15%;
	left: 55%;
}
.surprise {
	top: 35%;
	left: 80%;
}
.sadness {
	top: 70%;
	left: 65%;
}
.anger {
	top: 70%;
	left: 25%;
}
.fear {
	top: 35%;
	left: 10%;
}
.disgust {
	top: 15%;
	left: 25%;
}

.label:hover {
	text-decoration: underline;
}

.label {
	transform: translateX(-25%);
}

/* -----------------------------
   Regulation Section
------------------------------ */

.regulation-section {
	margin-top: 60px;
}

.exercise-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	margin-top: 30px;
}

.exercise-card {
	background: #ffffffaa;
	backdrop-filter: blur(6px);
	padding: 20px;
	border-radius: 20px;
	width: 220px;
	text-align: left;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.exercise-card h3 {
	margin-bottom: 10px;
	font-size: 16px;
}

.exercise-card p {
	font-size: 14px;
	line-height: 1.6;
}

.emotion-info {
	margin-top: 70px;
}

.back-button {
	display: inline-block;
	margin-top: 10px;
	margin-bottom: 20px;
	text-decoration: none;
	background: #ffffffaa;
	padding: 8px 16px;
	border-radius: 20px;
	color: #333;
	font-size: 14px;
	transition: 0.2s ease;
}

.back-button:hover {
	background: #ffffff;
}

/* -----------------------------
   Mask Explorer Page
------------------------------ */

.mask-section {
	margin-top: 40px;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}

.reflection-section {
	margin-top: 50px;
}

.reflection-grid {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	gap: 20px;
	margin-top: 20px;
}

.reflection-card {
	background: #ffffffaa;
	backdrop-filter: blur(6px);
	padding: 20px;
	border-radius: 20px;
	width: 220px;
	text-align: left;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	transition: 0.2s ease;
}

.reflection-card:hover {
	transform: translateY(-3px);
}

.compassion-section {
	margin-top: 50px;
}

/* -----------------------------
   Sensory Space
------------------------------ */

.sensory-section {
	margin-top: 40px;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}

.sensory-grid {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	gap: 20px;
	margin-top: 30px;
}

.sensory-card {
	background: #ffffffaa;
	backdrop-filter: blur(6px);
	padding: 20px;
	border-radius: 20px;
	width: 220px;
	text-align: left;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	transition: 0.2s ease;
}

.sensory-card:hover {
	transform: translateY(-3px);
}

/* -----------------------------
   Comfort Corner
------------------------------ */

.comfort-section {
	margin-top: 40px;
}

.comfort-grid {
	display: flex;
	flex-wrap: nowrap; 
	justify-content: center;
	gap: 20px;
	margin-top: 30px;
}

.comfort-card {
	background: #ffffffaa;
	backdrop-filter: blur(6px);
	padding: 20px;
	border-radius: 20px;
	width: 220px;
	text-align: left;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	transition: 0.2s ease;
}

.comfort-card:hover {
	transform: translateY(-3px);
}

/* -----------------------------
   Learn Page
------------------------------ */

.learn-section {
	margin-top: 40px;
	max-width: 750px;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
	line-height: 1.7;
}

.learn-section h2 {
	margin-top: 40px;
}

/* =========================================
   MOBILE OPTIMIZATION
========================================= */

@media (max-width: 768px) {

  body {
    align-items: stretch;
  }

  .container {
    padding: 20px 16px;
  }

  .top-bar {
    position: static;
    text-align: center;
    margin-top: 15px;
  }

  .logo {
    width: 90px;
  }

  .site-title {
    font-size: 24px;
    margin-bottom: 25px;
  }

  .subtitle {
    font-size: 18px;
  }

  .guide {
    width: 140px;
  }

  .speech-bubble {
    font-size: 16px;
    padding: 16px;
    max-width: 95%;
  }

  .menu {
    flex-direction: column;
    gap: 12px;
  }

  .card {
    width: 100%;
  }

  .emotion-wheel {
    width: 260px;
    height: 260px;
    margin: 40px auto;
  }

  .emotion-wheel::after {
    width: 90px;
    height: 90px;
  }

  .label {
    font-size: 14px;
  }

  .emotion-info,
  .mask-section,
  .sensory-section,
  .learn-section {
    padding: 0 5px;
    font-size: 15px;
  }

  .reflection-grid,
  .sensory-grid,
  .comfort-grid,
  .exercise-grid {
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .reflection-card,
  .sensory-card,
  .comfort-card,
  .exercise-card {
    min-width: 200px;
  }

  .popup-content {
    width: 90%;
    max-width: 350px;
    padding: 20px;
  }

  .stars span {
    font-size: 24px;
  }

}

/* =============================
   MOBILE OPTIMIZATION
============================= */

@media (max-width: 768px) {

  .container {
    padding: 25px 15px;
  }

  .site-title {
    font-size: 22px;
  }

  .logo {
    width: 80px;
  }

  .guide {
    width: 140px;
  }

  .speech-bubble {
    font-size: 15px;
    padding: 16px;
  }

  /* =============================
     MAIN MENU TABS
  ============================= */

  .menu {
    flex-wrap: wrap;       
    gap: 12px;
  }

  .card {
    flex: 1 1 45%;        
    padding: 12px 12px;
    font-size: 14px;
  }

  /* =============================
     ALL GRID CARDS
  ============================= */

  .reflection-grid,
  .sensory-grid,
  .comfort-grid,
  .exercise-grid {
    flex-wrap: wrap;          
  }

  .reflection-card,
  .sensory-card,
  .comfort-card,
  .exercise-card {
    width: 100%;              
    max-width: 320px;
  }

  /* =============================
     Emotion Wheel
  ============================= */

  .emotion-wheel {
    width: 260px;
    height: 260px;
  }

  .emotion-wheel::after {
    width: 90px;
    height: 90px;
  }

  .label {
    font-size: 13px;
  }

}
