/* ===== CSS RESET AND BASE ===== */
:root {
  --bg: linear-gradient(180deg, #0f2b58 0%, #060f25 100%);
  --bg-overlay: linear-gradient(180deg, rgba(16, 50, 98, 0.75) 0%, rgba(5, 14, 35, 0.92) 100%);
  --surface: rgba(18, 33, 62, 0.85);
  --surface-strong: rgba(24, 46, 84, 0.95);
  --border: rgba(146, 186, 255, 0.35);
  --text: #edf2fb;
  --text-muted: #c8d8f1;
  --accent: #7bb7ff;
  --accent2: #6ecfff;
  --success: #34d399;
  --warning: #facc15;
  --danger: #ff6a6a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

/* ===== FUNDAL UNIFICAT CROSS-BROWSER ===== */
html {
  height: 100%;
  width: 100%;
  background-color: #060f25; /* fallback solid dark */
  background: linear-gradient(180deg, #0f2b58 0%, #060f25 100%);
}

body {
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, rgba(16,50,98,0.95) 0%, rgba(5,14,35,1) 100%);
  color: #edf2fb;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
}

/* Optional overlay for darkening gradient slightly */
.bg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: -1;
}

/* ===== VIDEO BACKGROUND FULLSCREEN (dacă există) ===== */
.video-bg {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2; /* sub overlay și body */
}

/* Remove any previous body::before pseudo-element */
body::before {
  content: none !important;
}

/* VIDEO BACKGROUND FULLSCREEN */
.video-bg {
  display: none;
}

/* ===== FIXED HEADER ===== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, #264a93 0%, #1b326b 100%);
  border-bottom: 2px solid #80c2ff;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 4px 16px rgba(80, 150, 255, 0.2);
}

.header-container {
  display: flex;
  align-items: center;
  gap: 15px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.header-btn {
  padding: 10px 15px;
  background: linear-gradient(135deg, #82b7ff, #4a79ef) !important;
  color: #091228;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(32, 90, 170, 0.32);
}

.home-btn {
  font-size: 1.2rem;
  padding: 10px 12px;
}

.menu-btn {
  background: linear-gradient(135deg, #ff8f5d, #ffb070);
  color: #1a1f2d;
}

#simulateAttackBtn {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #0d1b24;
}

#miniTestHeaderBtn {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #1b1721;
}

@media (max-width: 768px) {
  .main-header {
    height: auto;
    padding: 8px 12px;
  }

  .header-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
    flex-wrap: nowrap;
  }

  #homeBtn {
    order: 1;
  }

  #menuToggle {
    order: 2;
  }

  #simulateAttackBtn {
    order: 3;
    margin-left: auto;
  }

  #miniTestHeaderBtn {
    order: 4;
    margin-left: 8px;
  }

  .header-btn {
    font-size: 0.8rem;
    padding: 8px 10px;
    min-width: 80px;
  }
}

/* ===== SIDE MENU ===== */
.side-menu {
  position: fixed;
  left: 0;
  top: 60px;
  width: 280px;
  height: calc(100vh - 60px);
  background: linear-gradient(180deg, #111827 0%, #0f1419 100%);
  border-right: 2px solid #00e5ff;
  z-index: 999;
  padding: 20px 0;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.side-menu.hidden {
  transform: translateX(-100%);
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #333;
  padding-bottom: 15px;
  background: linear-gradient(135deg, #82b7ff, #4a79ef) !important;
}

.menu-header h3 {
  color: #00e5ff;
  font-size: 1.2rem;
}

.close-menu {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
}

.menu-item {
  display: block;
  width: 100%;
  padding: 15px 20px;
  background: none;
  border: none;
  color: #d1d5db;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  border-left: 4px solid transparent;
}

.menu-item:hover {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.1);
  border-left-color: #00e5ff;
  padding-left: 25px;
}

/* ===== MENU OVERLAY ===== */
.menu-overlay {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  height: calc(100vh - 60px);
  background: rgba(0, 0, 0, 0.9);
  z-index: 998;
  transition: opacity 0.3s ease;
}

.menu-overlay.hidden {
  display: none;
}

.section {
  min-height: 100vh;
  padding: 30px 10%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  font-size: 5rem;
  margin-bottom: 20px;
  color: #ff0d0d;
  font-style:italic;
  font-family: '"Papyrus"', cursive;

}

h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #08e6ff;
  font-family: 'Times New Roman', Times, serif;
}

ul {
  list-style: disc;
  margin-left: 120px;
}

p, li {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.danger h2 { color: #ef4444; }
.safe h2 { color: #22c55e; }

.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.final {
  text-align: center;
}

.attack-diagram {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 40px 0;
}

.step {
  padding: 15px 25px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #0b0f19;
  font-weight: bold;
  border: none;
  cursor: pointer;
  clip-path: polygon(0 0, 90% 0, 100% 50%, 90% 100%, 0 100%, 10% 50%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1;
  flex: 0 0 auto;
  min-width: 220px;
}

.step:hover { transform: translateY(-3px); opacity: 0.9; }
.step.active { 
  background: linear-gradient(135deg, #00e5ff, #0284c7); 
  color: #0b0f19;
}

.step-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

.step-info {
  background: linear-gradient(135deg, #111827, #0f1419);
  padding: 25px;
  border-left: 4px solid #00e5ff;
}

.step-info h3 { color: #00e5ff; margin-bottom: 10px; }
.step-info p { color: #d1d5db; font-size: 1.05rem; }

.intro-text { max-width: 900px; margin-bottom: 30px; color: #9ca3af; }

.step-example, .step-detect { margin-top: 25px; }
.step-example h4, .step-detect h4 { color: #22c55e; margin-bottom: 10px; }

.stats-box { background: linear-gradient(135deg, #020617, #0f1419); padding: 25px; border: 1px solid #1f2937; }
.stats-box h4 { color: #00e5ff; margin-bottom: 20px; }

.stat { text-align: center; margin-bottom: 30px; }
.stat-number { font-size: 2.5rem; font-weight: bold; color: #00e5ff; }
.stat-text { color: #d1d5db; font-size: 1rem; margin-top: 10px; }

#step-detect li { color: #d1d5db; margin-bottom: 8px; font-size: 1rem; }

@media (max-width: 900px) {
  .step-layout { grid-template-columns: 1fr; }
}

.hero-intro {
  text-align: center;
  padding: 120px 10%;
}

.hero-title {
  font-size: 10px;
  color: var(--accent2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-top: 14px;
  color: var(--text-muted);
}

.hero-subtitle span {
  color: #7df9ff;
}

.hero-divider {
  width: 120px;
  height: 4px;
  margin: 40px auto;
  background: linear-gradient(90deg, transparent, #00eaff, transparent);
}

.hero-lead {
  max-width: 700px;
  margin: auto;
  opacity: 0.9;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 50px;
}

.stat-box span {
  font-size: 3rem;
  color: #00eaff;
}

.section {
  padding: 100px 10%;
}

.hero {
  padding-left: 1%;
}

.center-text {
  text-align: center;
  max-width: 700px;
  margin: auto;
}

.danger-grid,
.psy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.danger-card,
.psy-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  padding: 30px;
  border-radius: 12px;
  transition: transform 0.3s;
}

.danger-card:hover,
.psy-card:hover {
  transform: translateY(-8px);
}

.duel-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
}

.side {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  padding: 30px;
  border-radius: 12px;
}

.vs {
  font-size: 2rem;
  color: #00eaff;
}

.transition {
  text-align: center;
  padding: 0px 10%;
  margin-top: 0; 
}

.cta {
  padding: 14px 30px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.primary {
  background: #00eaff;
  color: #000;
}

.secondary {
  background: transparent;
  color: #00eaff;
  border: 1px solid #00eaff;
}

.attack-mode {
  background-color: #0b0b0b;
}

.attack-mode .hero-title {
  color: #ff3b3b;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero {
  justify-content: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-title {
  font-size: 3rem;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 2rem;
  color: #00eaff;
  line-height: 1.3;
}

.hero-text {
  max-width: 700px;
  color: #cbd5f5;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 20px;
}

.hero-stat span {
  font-size: 2rem;
  color: #00eaff;
  font-weight: bold;
}

.hero-stat p {
  font-size: 0.95rem;
  color: #9ca3af;
}

.attack-log {
  margin-top: 20px;
  padding: 15px;
  border-left: 4px solid #ff0055;
  background: rgba(255, 0, 85, 0.1);
  animation: fadeIn 0.5s ease;
}

.hidden {
  display: none;
}

.alert-mode {
  animation: alertPulse 1.5s infinite;
}

@keyframes alertPulse {
  0% { box-shadow: 0 0 0px #ff0055; }
  50% { box-shadow: 0 0 25px #ff0055; }
  100% { box-shadow: 0 0 0px #ff0055; }
}
/* Email Modal Styles */
.email-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

.email-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  backdrop-filter: blur(5px);
}

.email-modal-content {
  width: 500px;
  max-width: 90vw;
  background: linear-gradient(135deg, #1a1f2e, #111827);
  border: 1px solid #ff0055;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(255, 0, 85, 0.3);
  z-index: 1001;
  position: relative;
  animation: slideIn 0.3s ease-out;
}

.email-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #0f1419;
  border-bottom: 1px solid #333;
  border-radius: 8px 8px 0 0;
}

.email-from {
  font-size: 0.9rem;
  color: #999;
}

.email-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.email-close:hover {
  color: #ff0055;
}

.email-subject {
  padding: 15px;
  background: #ff0055;
  color: #fff;
  font-weight: bold;
  font-size: 1rem;
}

.email-body {
  padding: 20px;
  color: #d1d5db;
  line-height: 1.6;
}

.email-body p {
  margin-bottom: 12px;
}

.email-action-btn {
  background: linear-gradient(135deg, #ff0055, #ff4488);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.email-action-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 0, 85, 0.5);
}

.email-modal.hidden {
  display: none;
}

@keyframes slideIn {
  from {
    transform: translate(-50%, -60%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

.hero-actions {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  position: center;
  padding-left: 20px;
}

.hero-actions button {
  background: linear-gradient(135deg, #82b7ff, #4a79ef) !important;
  color: #0a0a0a;
  border: 2px solid #00eaff;
  border-radius: 14px;
  position: center;
  padding-left: 20px;
  padding: 16px 34px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;

  box-shadow:
    0 0 12px rgba(0, 234, 255, 0.6),
    inset 0 0 0 rgba(0,0,0,0);

  transition: 
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}

.hero-actions button:hover {
  background: #f7feff;
  color: #000;

  box-shadow:
    0 0 25px rgba(0, 234, 255, 1),
    0 0 60px rgba(0, 234, 255, 0.6);

  transform: translateY(-2px) scale(1.03);
}

.hero-actions button:active {
  transform: scale(0.96);
  box-shadow:
    0 0 15px rgba(0, 234, 255, 0.8);
}

.hidden {
  display: none;
}

/* FUNDAL MODAL */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal.hidden {
  display: none !important;
}

/* ===== RESPONSIVE HEADER ===== */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
    text-align: center;
  }

  .main-header {
    height: 70px;
    padding: 10px 10px;
  }

  .header-container {
    gap: 8px;
    justify-content: center;
  }

  .header-btn {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .home-btn {
    font-size: 1.1rem;
  }

  .side-menu {
    width: 100%;
    top: 70px;
    height: calc(100vh - 70px);
  }

  .menu-overlay {
    top: 70px;
    height: calc(100vh - 70px);
  }

  #simulateAttackBtn,
  #miniTestHeaderBtn {
    display: none;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-title {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-actions button {
    padding: 20px 40px;
    font-size: 1.2rem;
  }

  .section {
    padding: 60px 5%;
  }

  .lead-text {
    font-size: 40px;
  }

  .duel-intro p {
    font-size: 20px;
  }

  .hex-container {
    grid-template-columns: repeat(3, 200px);
    gap: 20px;
    justify-content: center;
  }

  .hex-card {
    width: 200px;
    height: 180px;
  }

  .duel-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .vs {
    margin: 20px 0;
  }

  .recognize-wrapper {
    flex-direction: column;
    gap: 40px;
    align-items: center;
  }

  .recognize-left {
    margin-left: 0;
  }

  .recognize-right {
    padding-left: 0;
    margin-right: 0;
  }

  .timeline-section {
    width: 100%;
    padding: 0 20px;
  }

  .timeline-content h3 {
    font-size: 1.4rem;
  }

  .timeline-content p {
    font-size: 16px;
  }

  .danger-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    justify-content: center;
  }

  .flip-card {
    height: 300px;
  }

  .intro-text {
    max-width: 100%;
  }

  .center-text {
    max-width: 100%;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .attack-diagram {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    justify-content: center;
  }

  .step {
    min-width: auto;
  }

  .danger-grid,
  .psy-grid {
    justify-content: center;
  }

  .step-layout {
    justify-content: center;
  }

  .hero-grid {
    justify-content: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-stat {
    text-align: center;
  }

  .stat-box span {
    display: block;
    margin: 0 auto;
  }

  .answer-grid {
    justify-content: center;
  }

  .modal-content {
    margin: 0 auto;
  }

  .email-modal-content {
    margin: 0 auto;
    width: calc(100vw - 20px);
    max-width: none;
  }
}

@media (max-width: 480px) {
  body {
    text-align: center;
  }

  .main-header {
    height: 60px;
  }

  .header-container {
    gap: 5px;
    justify-content: center;
  }

  .header-btn {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  .menu-btn {
    flex: 1;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-actions button {
    padding: 18px 36px;
    font-size: 1.1rem;
  }

  .section {
    padding: 50px 5%;
  }

  .danger-grid,
  .psy-grid {
    gap: 20px;
    justify-content: center;
  }

  .danger-card,
  .psy-card {
    padding: 20px;
  }

  .lead-text {
    font-size: 20px;
  }

  .duel-intro p {
    font-size: 18px;
  }

  .hex-card {
    height: 180px;
  }

  .recognize-left {
    margin-left: 0;
  }

  .term {
    font-size: 18px;
  }

  .term-desc {
    font-size: 18px;
  }

  .timeline-content h3 {
    font-size: 1.2rem;
  }

  .timeline-content p {
    font-size: 14px;
  }

  .danger-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    justify-content: center;
  }

  .flip-card {
    height: 250px;
  }

  .intro-text {
    max-width: 100%;
  }

  .center-text {
    max-width: 100%;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .attack-diagram {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    justify-content: center;
  }

  .step {
    min-width: auto;
  }

  .hex-container {
    grid-template-columns: repeat(3, 150px);
    gap: 15px;
    justify-content: center;
  }

  .hex-card {
    width: 150px;
    height: 140px;
  }

  .recognize-wrapper {
    align-items: center;
  }

  .step-layout {
    justify-content: center;
  }

  .hero-grid {
    justify-content: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-stat {
    text-align: center;
  }

  .stat-box span {
    display: block;
    margin: 0 auto;
  }

  .answer-grid {
    justify-content: center;
  }

  .modal-content {
    margin: 0 auto;
  }

  .email-modal-content {
    margin: 0 auto;
    width: calc(100vw - 20px);
    max-width: none;
  }
}

/* CUTIA DE LOGIN */
.modal-content {
  background: linear-gradient(135deg, #1a1f2e, #111827);
  color: #e5e7eb;
  padding: 30px;
  border-radius: 12px;
  width: min(90vw, 560px);
  max-width: 560px;
  text-align: center;
  animation: popIn 0.3s ease;
  border: 1px solid #ff0055;
  box-shadow: 0 10px 40px rgba(255, 0, 85, 0.3);
  z-index: 1001;
  position: relative;
}

.email-modal-content {
  width: min(94vw, 640px);
  max-width: 640px;
}

.modal-content h3 {
  margin-bottom: 10px;
}

.modal-content input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 6px;
  border: 1px solid #444;
  background: #0f1419;
  color: #e5e7eb;
}

.modal-content button {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: linear-gradient(135deg, #ff0055, #ff4488);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: white;
  font-weight: bold;
  transition: transform 0.2s, box-shadow 0.2s;
}

.modal-content button:hover {
  transform: scale(1.02);
  box-shadow: 0 0 15px rgba(255, 0, 85, 0.5);
}

.hint {
  font-size: 0.9rem;
  opacity: 0.85;
}

.success {
  margin-top: 15px;
  color: #22c55e;
  font-weight: bold;
}

@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.fake-link {
  color: #00aaff;
  text-decoration: underline;
  cursor: pointer;
  word-break: break-all;
}

.answer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 15px;
}

.answer {
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #444;
  background: linear-gradient(135deg, #0f1419, #111827);
  color: #e5e7eb;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.answer:hover {
  transform: scale(1.02);
  box-shadow: 0 0 10px rgba(0, 234, 255, 0.4);
}

.result-message {
  margin-top: 15px;
  font-weight: bold;
  text-align: center;
}

.result-message.success {
  color: #22c55e;
}

.result-message.error {
  color: #ef4444;
}
/* ===== FLIP CARDS STYLES ===== */
.danger-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin: 50px 0;
}

.flip-card {
  background-color: transparent !important;
  width: 100% !important;
  height: 350px !important;
  perspective: 1000px;
  cursor: pointer;
  padding: 0 !important;
  transition: none !important;
  transform: none !important;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid #00e5ff;
  background: linear-gradient(135deg, #111827, #0f1419);
}

.flip-card-front {
  color: #00e5ff;
  z-index: 2;
}

.flip-card-front h3 {
  font-size: 1.4rem;
  color: #00e5ff;
  line-height: 1.4;
}

.flip-card-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #1a1f2e, #111827);
  border-color: #ff0055;
  color: #d1d5db;
}

.flip-card-back p {
  margin: 10px 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .danger-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .flip-card {
    height: 300px !important;
  }

  .flip-card-front h3 {
    font-size: 1.2rem;
  }
}


/* HOME */
.home-btn {
  font-size: 26px;
  background: none;
  border: none;
  color: #00eaff;
  cursor: pointer;
}

.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-btn span {
  width: 30px;
  height: 3px;
  background: #00eaff;
}

/* ===== MENIU LATERAL ===== */
.side-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100vh;
  background: #0b0f19;
  padding: 30px;
  box-shadow: -10px 0 40px rgba(0,0,0,0.6);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-menu h3 {
  color: #00eaff;
  margin-bottom: 10px;
}

.side-menu button {
  background: #111827;
  border: 1px solid #00eaff;
  color: #e5e7eb;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
}

.menu-attack {
  background: linear-gradient(135deg, #ff0055, #ff4488);
  border: none;
  font-weight: bold;
}

/* OVERLAY */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
}

.hidden {
  display: none !important;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2.8fr 1fr;
  align-items: center;
  gap: 10px;
  padding-left: 0;
  margin-left: -5%;
}

.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

#hackerAnimation {
  width: 420px;
  max-width: 100%;
  filter: drop-shadow(0 0 30px rgba(0, 229, 255, 0.35));
}

/* responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-right {
    margin-top: 40px;
  }
}

body {
  position: relative;
  z-index: 1;
}

.psychology-subtitle {
  text-align: center;
  color: #fff;
  margin-bottom: 40px;
  font-size: 26px;
}

.hex-container {
  display: grid;
  grid-template-columns: repeat(3, 300px);
  gap: 30px 20px;
  justify-content: center;
  margin-top: 50px;
}

.hex-subtitle {
  margin-bottom: 30px;
  color: #ff1a1a;
  font-size: 1.4rem;
  text-align: center;
}

.hex-card {
  position: relative;
  width: 300px;
  height: 260px;
  background: linear-gradient(135deg, #010003, #363541);
  clip-path: polygon(
    50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%
  );
  border: 4px solid #ff1a1a;
  box-shadow: 0 0 15px rgba(255, 26, 26, 0.7);
  transition: box-shadow 0.3s ease;
  overflow: hidden;
}

.hex-card:hover {
  box-shadow: 0 0 25px rgba(255, 26, 26, 1);
  transform: scale(1.05);
  z-index: 10;
}

.hex-content {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  font-size: 1.1rem;
  transition: opacity 0.5s ease;
}

.front {
  background: transparent;
  opacity: 1;
  font-size: 1.4rem;
  font-weight: bold;
  animation: pulse 2s infinite;
  transition: opacity 0.5s ease;
}

.back {
  background: transparent;
  opacity: 0;
  font-size: 1rem;
  transition: opacity 0.5s ease;
}

.hex-card:hover .front {
  opacity: 0;
}

.hex-card:hover .back {
  opacity: 1;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.hidden {
  display: none;
}

.start-quiz-btn {
  margin-top: 30px;
  padding: 14px 26px;
  border-radius: 34px;
  border: none;
  background: linear-gradient(135deg, #82b7ff, #4a79ef) !important;
  color: #000;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.start-quiz-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.psych-quiz {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz-options {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.quiz-options .answer {
  background: #0f1419;
  border: 1px solid #00eaff;
  color: #e5e7eb;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
}

.quiz-options .answer.selected {
  background: #00eaff;
  color: #000;
  font-weight: bold;
}

.quiz-feedback {
  margin-top: 15px;
  font-size: 1.1rem;
  text-align: center;
}

.quiz-progress {
  margin-bottom: 20px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00ffff, #0077ff);
  transition: width 0.4s ease;
}

.progress-text {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  opacity: 0.8;
}

.quiz-btn {
  padding: 10px 22px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid #00ffff;
  color: #00ffff;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.quiz-btn:hover {
  background: rgba(0, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.quiz-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.video-overlay {
  display: none;
}

.duel-section {
  background: rgba(255,255,255,0.02);
}

.duel-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  margin-top: 50px;
  align-items: start;
}

.side {
  background: rgba(255,255,255,0.05);
  padding: 30px;
  border-radius: 14px;
}

.attacker h3 { color: #ef4444; }
.defender h3 { color: #22c55e; }

.vs {
  font-size: 2.5rem;
  color: #00eaff;
  align-self: center;
}

.info-card {
  background: linear-gradient(135deg, rgba(0,0,0,0.4), rgba(0,0,0,0.2));
  padding: 15px 20px;
  margin-top: 15px;
  margin-bottom: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s;
}

.attacker .info-card:hover {
  background: rgba(239,68,68,0.2);
  transform: translateX(5px);
}

.defender .info-card:hover {
  background: rgba(34,197,94,0.2);
  transform: translateX(-5px);
}

.info-box {
  margin-top: 40px;
  padding: 30px;
  background: linear-gradient(135deg, #020617, #0f1419);
  border-left: 4px solid #00eaff;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.info-box h4 {
  color: #00eaff;
  margin-bottom: 15px;
}

.duel-intro {
  max-width: 900px;
  margin: 0;
  text-align: left;
  font-size: 30px;
  padding: 0;
}

.duel-intro h2 {
  font-size: 30px;
  margin-bottom: 30px;
  max-width: 900px;
  margin: 0;
  text-align: left;
  font-family: 'Times New Roman', Times, serif;
}

.lead-text {
  font-family: 'Times New Roman', Times, serif;
  font-size: 40px;
  color: #e5e7eb;
  margin-bottom: 10px;
  margin-left: 0;
  padding-left: 0;
  max-width: 100%;
}

.duel-intro p {
  color: #9ca3af;
  line-height: 0.6;
  font-size: 30px;
  color: #e5e7eb;
  margin-bottom: 10px;
  margin-left: 0;
  padding-left: 0;
  font-family: 'Times New Roman', Times, serif;
  line-height: 1.2;
}

.side-desc {
  font-size: 0.95rem;
  color: #cbd5f5;
  margin-bottom: 15px;
  line-height: 1.6;
}

.timeline-section {
  width: 70%;
  margin: 0 100px;
  padding: 0 100px;
  color: #e5e7eb;
}

.timeline-section h2 {
  text-align: left;
  margin-bottom: 40px;
  color: #00eaff;
  position: relative; 
  z-index: 2;        
  margin-left: 0;
}

.timeline {
  position: relative;
  margin-left: 0;
  padding-left: 20px;
  border-left: 3px solid #00eaff;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: #00eaff;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -8px; /* centrul cercului peste linia verticală */
  top: 0;
  width: 16px;
  height: 16px;
  background: #ff0055;
  border-radius: 50%;
}

.timeline-point {
  position: absolute;
  left: -11px; /* half of point size + border width */
  top: 0;
  width: 20px;
  height: 20px;
  background-color: #00eaff;
  border-radius: 50%;
  border: 3px solid #0f172a; /* optional: contrast with background */
}

.timeline-content {
  padding-left: 10px;
}

.timeline-content h3 {
  margin: 0 0 5px 0;
  font-size: 1.6rem;
  font-family: 'Times New Roman', Times, serif;
  color: #00eaff;
}

.timeline-content p {
  margin: 0;
  font-size: 20px;
  line-height: 1.6;
  font-family: 'Times New Roman', Times, serif;
}

.recognize-interactive {
  position: relative;
  z-index: 2;
}

.recognize-interactive h2 {
  color: #00eaff;
  margin-bottom: 30px;
}

.recognize-wrapper {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* STÂNGA */
.recognize-left {
  flex: 1 1 500px;
  margin-left: 30px;
}

.term {
  cursor: pointer;
  font-size: 23px;
  font-weight: bold;
  color: #e5e7eb;
  margin-bottom: 18px;
  position: relative;
  font-family: 'Times New Roman', Times, serif;
}

.term:hover {
  color: #00eaff;
}

.term-desc {
  display: none;
  font-size: 23px;
  font-weight: normal;
  line-height: 1.8;
  color: #cbd5f5;
  margin-top: 8px;
  max-width: 520px;
  font-size: 'Times New Roman', Times, serif;
}

.term.active .term-desc {
  display: block;
  font-family: 'Times New Roman', Times, serif;
}

@keyframes pulse {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

/* DREAPTA */
.recognize-right {
  flex: 1 1 350px;
  display: flex;
  justify-content: flex-start;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  padding-left: 40px;
}

.recognize-right img {
  max-width: 80%;
  opacity: 0.9;
  margin-right: 50px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 234, 255, 0.5);
  display: block;
}

/* ==========================================================================
   MOBILE ADAPTATIONS – doar ce e necesar pe ecrane ≤ 880px
   Desktop rămâne 100% nemodificat
========================================================================== */

@media screen and (max-width: 880px) {

  body {
    padding-top: 70px;           /* header mai înalt pe mobil */
  }

  .main-header {
    height: 70px;
    padding: 0 12px;
  }

  .header-container {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .header-btn {
    padding: 10px 14px;
    font-size: 0.92rem;
  }

  /* Hero – text mai mic, animație mai mică */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-left {
    text-align: center;
  }

  .hero-title {
    font-size: 60px !important;
    position: center;
    padding-left: 20px;
  }

  .hero-subtitle {
    font-size: 1.9rem !important;
    position: center;
    padding-left: 20px;
  }

  .hero-text {
    font-size: 1.35rem !important;
  }

  .hero-stat span {
    font-size: 2.6rem;
  }

  .hero-stat p {
    font-size: 1.15rem;
  }

  .hero-right lottie-player {
    width: 90vw !important;
    height: 90vw !important;
    max-width: 420px;
    max-height: 420px;
  }

  /* Secțiuni generale */
  .section {
    padding: 50px 5% !important;
    min-height: auto;
  }

  h1, h2 {
    font-size: 2.4rem !important;
  }

  h3 {
    font-size: 1.55rem !important;
  }

  p, li {
    font-size: 1.1rem !important;
  }

  /* Flip cards – 2 in a row for better text fit */
  .danger-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
  }

  .flip-card {
    height: 240px !important;
  }

  .flip-card-front h3,
  .flip-card-back p {
    font-size: 12px !important;
    line-height: 1.3 !important;
    padding: 10px !important;
  }

  /* Hex cards – 2 in a row for better text fit */
  .hex-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    padding: 0 10px !important;
  }

  .hex-card {
    width: 100% !important;
    height: 200px !important;
  }

  .hex-content {
    padding: 15px !important;
  }

  .hex-content.front {
    font-size: 15px !important;
  }

  .hex-content.back {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  /* Duel secțiune */
  .duel-grid {
    grid-template-columns: 1fr !important;
    gap: 30px;
  }

  .vs {
    margin: 10px 0;
    font-size: 3rem;
  }

  /* Timeline */
  .timeline-section {
    width: 100% !important;
    padding: 0 5% !important;
    margin: 0 !important;
  }

  .timeline {
    padding-left: 30px;
  }

  /* Recognize section */
  .recognize-wrapper {
    flex-direction: column !important;
    gap: 40px;
  }

  .recognize-right img {
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  /* Modale – aproape full screen */
  .email-modal-content,
  .modal-content {
    width: 94% !important;
    max-width: 720px !important;
    min-width: 300px !important;
  }

  .email-body,
  .modal-content {
    padding: 20px !important;
  }

  /* Quiz & answers */
  .answer-grid,
  .quiz-options {
    grid-template-columns: 1fr !important;
  }

  .answer,
  .quiz-btn {
    padding: 16px !important;
    font-size: 1.1rem !important;
  }

  /* Meniu lateral → devine bottom sheet-ish sau full left */
  .side-menu {
    width: 85% !important;
    left: 0 !important;
    right: auto !important;
  }
}

/* ==========================================================================
   MOBILE TAP INTERACTIONS – flip, hex, protection bubbles
   Funcționează cu tap scurt + toggle persistent (prin JS)
========================================================================== */

@media screen and (max-width: 880px) {
  /* Protection circles - 3 in a row, smaller */
  .protection-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    max-width: 100% !important;
    padding: 0 10px !important;
  }

  .method {
    width: 100px !important;
    height: 100px !important;
    margin: 0 !important;
  }

  .method span {
    font-size: 11px !important;
    padding: 5px !important;
    line-height: 1.2 !important;
  }

  /* Hide tooltips on mobile - only show title */
  .method .tooltip {
    display: none !important;
  }

  .flip-card,
  .hex-card,
  .method {
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(100,100,255,0.2); /* highlight vizibil la tap */
    touch-action: manipulation;
    user-select: none;
  }

  /* Flip card toggle */
  .flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg) !important;
  }

  /* Hex toggle */
  .hex-card.flipped .front {
    opacity: 0 !important;
  }
  .hex-card.flipped .back {
    opacity: 1 !important;
  }

  /* Bulină toggle – info în interior */
  .method {
    cursor: pointer !important;                    /* Safari cere asta pentru tappability */
    -webkit-tap-highlight-color: rgba(100, 100, 255, 0.2);
    touch-action: manipulation;
    user-select: none;
    position: relative;
    border-radius: 50%;
    pointer-events: auto !important;
    background-clip: padding-box;
    /* Fără overflow: hidden – Safari blochează events cu el + border-radius + absolute child */
  }

  .method > span {
    /* Titlul inițial */
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .method .tooltip {
  opacity: 0;
  height: 0;           /* ascunde inițial */
  overflow: hidden;    /* ascunde textul */
  transition: opacity 0.3s ease, height 0.3s ease;
  color: #e5e7eb;      /* ensure text is visible */
  background: #222;    /* ensure background is visible */
  border: 1px solid #00eaff; /* add border for better visibility */
}

.method .tooltip.shown {
  opacity: 1;
  height: auto;        /* permite textului să apară */
  overflow: visible;   /* vizibil tot conținutul */
  color: #e5e7eb;      /* ensure text remains visible */
}

  .method.shown > span {
    opacity: 0;
  }

  /* Efect la apăsare – vizibil pe Safari */
  .method:active {
    transform: scale(1.04);
    box-shadow: 0 0 25px rgba(255,255,255,0.2) !important;
  }
}

.video-overlay, .video-bg {
  background: var(--bg) !important;
}

.section {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(9, 19, 42, 0.35);
}

.section h1,
.section h2,
.section h3,
.section p,
.section li,
.section span,
.section a {
  color: var(--text) !important;
}

.main-header,
.side-menu,
.menu-overlay,
.modal-content,
.email-modal-content {
  background: var(--surface-strong) !important;
  color: var(--text) !important;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text) !important;
}

p, li, a, span, button {
  color: var(--text) !important;
}

a {
  color: var(--accent) !important;
}

a:hover {
  color: var(--accent2) !important;
}

@media screen and (max-width: 880px) {
  .header-container {
    justify-content: flex-start !important;
    gap: 2px !important;
    flex-wrap: nowrap !important;
  }

  #homeBtn {
    order: 1 !important;
  }

  #menuToggle {
    order: 2 !important;
    margin-left: 1px !important;
    padding-left: 3px !important;
    padding-right: 6px !important;
  }

  #simulateAttackBtn {
    display: inline-flex !important;
    order: 3 !important;
    margin-left: auto !important;
  }

  #miniTestHeaderBtn {
    display: inline-flex !important;
    order: 4 !important;
    margin-left: 8px !important;
  }

  .menu-btn {
    min-width: auto !important;
    white-space: nowrap !important;
  }
}

@media screen and (max-width: 480px) {
  .header-container {
    gap: 6px !important;
    justify-content: flex-start !important;
  }

  #homeBtn, #menuToggle, #simulateAttackBtn, #miniTestHeaderBtn {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
    min-width: 60px !important;
  }
}

/* HEX CARD */
.hex-card {
  position: relative;
  width: 300px;
  height: 260px;
  background: linear-gradient(135deg, #010003, #363541);
  clip-path: polygon(
    50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%
  );
  border: 2px solid var(--accent);
  overflow: hidden;
  cursor: pointer;
}

/* COMMON */
.hex-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;

  transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* FRONT (titlu) */
.hex-content.front {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  font-weight: bold;
  font-size: 1.3rem;
}

/* BACK (text) */
.hex-content.back {
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  font-size: 1rem;
}

/* HOVER FIX */
.hex-card:hover .front {
  opacity: 0;
  visibility: hidden;
}

.hex-card:hover .back {
  opacity: 1;
  visibility: visible;
}

/* OPTIONAL: mic efect */
.hex-card:hover {
  transform: scale(1.05);
}
