/* ============================================================
   KẾT BẠN TRỰC TUYẾN AN TOÀN - CANVA STYLE (KIDS 9-13)
   ============================================================ */

/* ---------- CSS VARIABLES ---------- */
:root {
  --primary-blue: #4A90E2;       /* Vibrant Blue */
  --primary-blue-dark: #2C3E50;  /* Dark Blue-Gray for main headings */
  --secondary-green: #2ECC71;    /* Friendly Green */
  --warning-yellow: #FDCB6E;     /* Warm Yellow */
  --danger-red: #FF6B6B;         /* Coral Red */
  --bg-light: #F0F4F8;           /* Soft pastel background */
  --text-dark: #2C3E50;          /* Deep text color for contrast */
  --text-light: #7F8C8D;
  --card-bg: #FFFFFF;
  
  --font-family: 'Nunito', sans-serif;
}

/* ---------- RESET & GLOBAL ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font-family); background-color: var(--bg-light);
  color: var(--text-dark); overflow: hidden; user-select: none;
}

/* ---------- SLIDE CONTAINER ---------- */
.slides-container {
  position: relative; width: 100vw; height: 100vh;
  display: flex; align-items: center; justify-content: center;
}

.slide {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  padding: 2vh 3vw 8vh 3vw; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  background: var(--bg-light);
  overflow: hidden;
}

.slide.active { opacity: 1; pointer-events: auto; z-index: 10; }
.slide.exit-left { transform: translateX(-50px); opacity: 0; }
.slide.enter-right { transform: translateX(50px); opacity: 0; }

/* ---------- MASCOT ---------- */
.mascot {
  position: absolute; bottom: 20px; left: 20px; width: 15vh; height: auto;
  z-index: 50; filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
}

/* ---------- TYPOGRAPHY (Responsive) ---------- */
h1 { font-size: clamp(28px, 5vh, 50px); font-weight: 900; color: var(--primary-blue-dark); margin-bottom: 1.5vh; text-align: center; text-shadow: 2px 2px 0px #fff, 4px 4px 0px rgba(0,0,0,0.1); }
h2 { font-size: clamp(22px, 4vh, 40px); font-weight: 800; color: var(--primary-blue); margin-bottom: 2vh; line-height: 1.2; }
h3 { font-size: clamp(18px, 3vh, 26px); font-weight: 700; margin-bottom: 1vh; }
p, ul, li { font-size: clamp(15px, 2.5vh, 22px); line-height: 1.3; color: var(--text-dark); }
ul { padding-left: 3vw; margin-bottom: 1vh; }
li { margin-bottom: 0.5vh; }

.highlight-green { color: var(--secondary-green); font-weight: bold; }
.highlight-red { color: var(--danger-red); font-weight: bold; }
.highlight-yellow { color: var(--warning-yellow); font-weight: bold; }

/* Override Inline Styles for Emojis */
div[style*="font-size"] { font-size: clamp(30px, 6vh, 70px) !important; margin: 0 auto !important; }

/* Thêm Highlight Text Nổi Bật (Slide 9) */
.text-box-highlight {
  background: #ffebee;
  border: 4px dashed var(--danger-red);
  padding: 3vh;
  border-radius: 20px;
  box-shadow: 0 10px 20px rgba(244,67,54,0.2);
}
.text-box-highlight li {
  font-size: clamp(20px, 4vh, 35px); font-weight: bold; color: var(--danger-red); margin-bottom: 2vh;
}

/* ---------- LAYOUTS ---------- */
.layout-70-30 { display: flex; width: 100%; max-width: 1400px; gap: 2vw; align-items: center; justify-content: center;}
.col-70 { flex: 0 0 65%; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.col-30 { flex: 0 0 35%; display: flex; flex-direction: column; justify-content: center; }
.layout-50-50 { display: flex; width: 100%; max-width: 1400px; gap: 2vw; align-items: stretch; justify-content: center;}
.col-50 { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.layout-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; width: 100%; max-width: 1200px; }

/* ---------- CARD GRIDS ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5vh; width: 100%; margin-top: 1.5vh; }
.grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1vh; width: 100%; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5vh; width: 100%; margin-top: 1.5vh; }

.feature-card {
  background: var(--card-bg); border-radius: 15px; padding: 1.5vh; text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: transform 0.2s; cursor: pointer; border: 4px solid transparent;
}
.feature-card:hover { transform: translateY(-5px); }
.feature-card.interactive:active { transform: scale(0.95); }
.feature-card img { width: 6vh; height: 6vh; margin-bottom: 1vh; border-radius: 50%; object-fit: cover; }

/* ---------- BUTTONS ---------- */
.btn-large {
  padding: 1.5vh 3vw; font-size: clamp(16px, 3vh, 24px); font-weight: bold; border-radius: 15px; border: none;
  cursor: pointer; transition: all 0.2s; color: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.btn-large.btn-green { background: var(--secondary-green); }
.btn-large.btn-red { background: var(--danger-red); }
.btn-large.btn-blue { background: var(--primary-blue); }
.btn-large:hover { transform: translateY(-3px); filter: brightness(1.1); }
.btn-large:active { transform: scale(0.95); }

/* ---------- NAVIGATION ---------- */
.slide-nav {
  position: fixed; bottom: 0; left: 0; width: 100%; padding: 1.5vh 3vw;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0,0,0,0.05); z-index: 100;
}
.slide-nav button {
  padding: 1vh 2vw; border: none; border-radius: 12px; background: var(--primary-blue);
  color: white; font-size: clamp(14px, 2vh, 18px); font-weight: bold; cursor: pointer; transition: opacity 0.2s;
}
.slide-nav button:disabled { opacity: 0.3; cursor: not-allowed; }
.slide-counter { font-size: clamp(14px, 2vh, 20px); font-weight: bold; color: var(--text-light); }

/* ---------- CUSTOM ELEMENTS ---------- */
.flow-diagram { display: flex; flex-direction: column; align-items: center; gap: 1.5vh; }
.flow-step { background: var(--primary-blue); color: white; padding: 1.5vh 3vw; border-radius: 16px; font-size: clamp(20px, 4vh, 35px); font-weight: bold; width: 100%; max-width: 400px; text-align: center; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.flow-arrow { font-size: clamp(30px, 5vh, 40px); color: var(--text-light); }

/* Fake Profiles & Chats */
.fake-profile, .fake-chat {
  background: white; border-radius: 15px; overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1); width: 100%; max-width: 500px; position: relative; margin: 0 auto;
}
.fake-cover { height: 8vh; background: #ddd; }
.fake-avatar {
  width: 8vh; height: 8vh; border-radius: 50%; background: #eee;
  border: 4px solid white; position: absolute; top: 4vh; left: 2vw;
}
.fake-info { padding: 5vh 2vw 1.5vh; text-align: left;}
.chat-header { background: #f0f2f5; padding: 1vh 1.5vw; font-size: clamp(14px, 2.2vh, 18px); font-weight: bold; border-bottom: 1px solid #ddd; display: flex; align-items: center; gap: 8px; }
.chat-body { padding: 1.5vh; display: flex; flex-direction: column; gap: 1vh; background: #fff; min-height: 12vh; text-align:left;}
.chat-bubble { max-width: 85%; padding: 1vh 1.5vw; border-radius: 12px; font-size: clamp(13px, 2vh, 18px); }
.chat-received { background: #f0f2f5; align-self: flex-start; border-bottom-left-radius: 5px; }

/* Carousel cho ví dụ */
.carousel-container { position: relative; width: 100%; max-width: 700px; margin: 0 auto; display: flex; align-items: center; justify-content: center;}
.carousel-item { display: none; width: 100%; animation: fadein 0.5s;}
.carousel-item.active { display: block; }
.carousel-btn {
  background: var(--primary-blue); color: white; border: none; border-radius: 50%;
  width: 5vh; height: 5vh; font-size: clamp(16px, 2.5vh, 24px); cursor: pointer; position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  display: flex; align-items: center; justify-content: center;
}
.carousel-btn.prev { left: -6vh; }
.carousel-btn.next { right: -6vh; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* QR Code Display */
.qr-container {
  background: white; padding: 1.5vh; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  display: flex; flex-direction: column; align-items: center; gap: 1vh; border: 3px dashed var(--primary-blue);
}
.qr-container img { max-width: 20vh; max-height: 20vh; object-fit: contain; }

/* Feedback Modal (Popups) */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center;
  z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; backdrop-filter: blur(5px);
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.feedback-modal {
  background: #fff; border-radius: 24px; padding: 4vh; max-width: 600px; width: 90%; text-align: center;
  transform: scale(0.8); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.modal-overlay.show .feedback-modal { transform: scale(1); }
.modal-icon { font-size: clamp(50px, 10vh, 100px); margin-bottom: 2vh; }
.feedback-modal h3 { font-size: clamp(24px, 5vh, 40px); margin-bottom: 2vh; }
.feedback-modal p { font-size: clamp(16px, 3vh, 28px); margin-bottom: 3vh; }
