:root{
  --bg:#f7f8fa;
  --text:#111;
  --primary:#0b74de;

  --card-bg:#ffffff;
  --border:#e5e7eb;
  --muted:#555;

  --link:#0b74de;
  --shadow: 0 2px 6px rgba(0,0,0,0.1);
  --alert-bg: #fef8e7;
  --alert-border: #ffb300;
}

body.dark{
  --bg:#0b1220;
  --text:#e5e7eb;
  --primary:#3b82f6;

  --card-bg:#0f172a;             
  --border:rgba(255,255,255,0.12);
  --muted:rgba(229,231,235,0.72);

  --link:#93c5fd;
  --shadow: 0 2px 10px rgba(0,0,0,0.6);
  --alert-bg: #2a240f;    
  --alert-border: #fbbf24;
}

body.dark a {
  color: var(--primary);
}


body, .card, .btn {
  transition: background 0.3s, color 0.3s;
}


.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
}


*{box-sizing:border-box}

body {
  margin:0;
  font-family: system-ui;
  background:var(--bg);
  color:var(--text);
}


.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;               
  background: var(--bg);      
  border-bottom: 1px solid var(--border);
}


.site-header h1 {
  color: var(--text);
  margin: 0;
  padding: 10px 16px;
  font-size: 18px;
}


.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 8px 16px;
  position: relative;
  z-index: 1001;              
}


.nav a {
  position: relative;
  color: var(--text);
  text-decoration: none;
  padding: 6px 12px;
  white-space: nowrap;          
}

.nav a:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 60%;
  width: 1px;
  background: var(--border);
}


.nav a::before {
  content: "";
  position: absolute;
  left: 10%;
  bottom: -6px;
  width: 80%;
  height: 2px;
  background-color: var(--primary);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::before {
  transform: scaleX(1);
}


main {
  position: relative;
  z-index: 1;                
}


.container {
  padding:16px;
  max-width:900px;
  margin:0 auto;
}

.card {
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:12px;
  margin:10px 0;
}

.btn {
  background:var(--primary);
  color:#fff;
  border:0;
  padding:10px 14px;
  border-radius:8px;
}

.list {
  display:grid;
  gap:10px;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.guide-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
}
.guide-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.guide-card p { margin: 0 0 8px; color: #444; }

.guide-detail p { margin: 8px 0; line-height: 1.5; }

.guides-list {
  padding: 1.5rem;
}

.guides-list h2 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}


.guides-list .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}


.card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 1.2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.card h3 {
  color: #222;
  margin-bottom: 0.5rem;
}

.card p {
  color: #555;
  font-size: 0.95rem;
}

.card .btn {
  background-color: #0b74de;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  margin-top: 0.8rem;
}

.card .btn:hover {
  background-color: #095eb4;
}


.guide-detail {
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  max-width: 800px;
  margin: 1rem auto;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.guide-detail h2 {
  margin-bottom: 1rem;
}

.guide-detail h3 {
  margin-top: 1rem;
  color: #222;
}

.guide-detail p,
.guide-detail li {
  color: #444;
  line-height: 1.5;
}

.guide-detail .btn {
  display: inline-block;
  margin-top: 1.5rem;
}

.guide-header {
  display: flex;
  flex-direction: column; 
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.guide-header h2 {
  flex: 1;
  text-align: center;
  margin: 0;
  font-size: 1.8rem;
  width: 100%
}

.guide-header .back-btn {
  position: static;
}


.quiz-page {
  background: #fff;
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
}

.quiz-page h2 {
  margin-bottom: 1rem;
}

.option-btn {
  display: block;
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f8f9fa;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.option-btn:hover {
  background: #e9f2ff;
}

.option-btn.correct {
  background: #c8f7c5;
  border-color: #4caf50;
}

.option-btn.wrong {
  background: #ffcccc;
  border-color: #f44336;
}

.video-wrapper {
  margin: 1.5rem 0;
  text-align: center;
}

.video-wrapper iframe {
  width: 100%;
  max-width: 640px;
  height: 360px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.phishing-images {
  display: flex;
  flex-direction: column; 
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.phishing-images img {
  width: 100%;
  max-width: 600px; 
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.phishing-images img:hover {
  transform: scale(1.02);
}

@media (min-width: 900px) {
  .phishing-images {
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
  }

  .phishing-images img {
    width: 55%;
    max-width: none;
  }
}

.alert-box {
  background: var(--alert-bg);
  border-left: 4px solid var(--alert-border);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 8px;
}


body.dark .alert-box {
  color: #fefce8;
}



.forum-page {
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  max-width: 800px;
  margin: 1.5rem auto;
}

.forum-input {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

#newPost {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.75rem;
  resize: none;
  font-family: inherit;
}

.post-card {
  background: #f7f8fa;
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.8rem;
}

.post-card small {
  color: #666;
  font-size: 0.8rem;
}


.small-btn {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  margin-top: 0.4rem;
}

h3 {
  margin-bottom: 0.4rem;
}

.forum-page hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 1rem 0;
}

#backToTop {
  display: none; 
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  font-size: 18px;
  border: none;
  outline: none;
  background-color: var(--primary);
  color: white;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: opacity 0.3s, transform 0.2s;
}

#backToTop:hover {
  background-color: #095eb4;
  transform: translateY(-3px);
}

.progress {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 8px;
  text-align: right;
  opacity: 0.8;
}

.pfp-icon {
  float: right;
  width: 32px;
  height: 32px;
  object-fit: cover;
  cursor: pointer;
}

.pfp-menu {
  float: right;
  position: relative;
}

.dropdown {
  position: absolute;
  right: 0;
  top: 40px;
  background: var(--card-bg, #fff);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hidden {
  display: none;
}


.option-btn {
  display: block;
  width: 100%;
  margin: 8px 0;
  padding: 12px;
  border: 2px solid #ccc;
  border-radius: 8px;
  background: #fff;
  transition: 0.2s;
  text-align: left;
}

.option-btn:hover {
  background: #f2f2f2;
}

.option-btn.saved-answer {
  background: #d0e7ff;      
  border-color: #0b74de;   
  color: #000;
}

#guideContent {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}
body.pdf-capture .site-header {
  position: static !important;  
}

body.pdf-capture .container {
  max-width: none !important;   
}

body.pdf-capture #guideContent {
  max-width: none !important;
  width: 100% !important;
}

.home-welcome { margin-top: 1rem; }
.home-paths { margin-top: 1rem; }
.home-actions { margin-top: 1rem; display: grid; gap: 0.75rem; }

.path-boxes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.path-box {
  display: block;
  padding: 1rem;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.path-box h4 {
  margin: 0 0 0.5rem;
}

.path-box p {
  margin: 0;
  opacity: 0.85;
  line-height: 1.4;
}

.path-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.btn.danger {
  border: 1px solid rgba(255,0,0,0.35);
}


@media (max-width: 800px) {
  .path-boxes {
    grid-template-columns: 1fr;
  }
}
.guide-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.level-badge {
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  white-space: nowrap;
  opacity: 0.9;
  font-weight: 600;
}


.link-btn {
  display: inline-block;
  margin-top: 0.25rem;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.95rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 9999;
}

.modal {
  width: min(520px, 100%);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.hidden { display: none !important; }

.muted { opacity: 0.85; }
.small { font-size: 0.9rem; }

.history-modal-body {
  margin-top: 0.75rem;
  max-height: 320px;
  overflow: auto;
  padding-right: 0.25rem;
}

.history-item {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}


.level-tag {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.18);
  font-size: 0.8rem;
  opacity: 0.9;
}

.notif-wrap {
  position: relative;
}

.notif-btn {
  padding: 4px;
}

.notif-icon {
  width: 22px;
  height: 22px;
}

.notif-wrap .dropdown {
  position: absolute;
  right: 0;
  top: 2.6rem;
  width: 280px;
  z-index: 1000;
}

.hidden {
  display: none;
}

.muted {
  opacity: 0.75;
}


.card,
.guide-card,
.guide-detail,
.quiz-page,
.forum-page,
.post-card,
.dropdown{
  background: var(--card-bg) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow);
}

.card h2, .card h3, .card h4,
.guide-detail h2, .guide-detail h3,
.quiz-page h2,
.forum-page h2, .forum-page h3{
  color: var(--text) !important;
}

.card p,
.guide-card p,
.guide-detail p,
.guide-detail li,
.post-card small,
.progress{
  color: var(--muted) !important;
}
.option-btn{
  background: var(--card-bg);
  color: var(--text);
  border-color: var(--border);
}

.option-btn:hover{
  filter: brightness(1.05);
}

body.dark .option-btn:hover{
  filter: brightness(1.15);
}

body.dark .option-btn.saved-answer{
  background: rgba(59,130,246,0.20);
  border-color: var(--primary);
  color: var(--text);
}


.guide-figure {
  margin: 1.5rem auto;
  text-align: center;
}

.guide-figure img {
  max-width: 100%;
  width: 520px;        
  height: auto;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.guide-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}



.password-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.password-table th,
.password-table td {
  border: 1px solid var(--border);
  padding: 0.6rem;
  text-align: left;
}

.password-table th {
  background: var(--primary);
  color: #fff;
}

.password-table tr:nth-child(even) {
  background: rgba(0,0,0,0.03);
}

body.dark .password-table tr:nth-child(even) {
  background: rgba(255,255,255,0.05);
}


.example-box {
  background: #eef4ff;
  border-left: 4px solid #3b82f6;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 8px;
}

.example-box h4 {
  margin-top: 0;
}


body.dark .example-box {
  background: rgba(59,130,246,0.15);
  border-left-color: #60a5fa;
}



.example-box.playful {
  background: #f0f7ff;
  border-left: 4px solid var(--primary);
  padding: 1rem;
  border-radius: 10px;
  margin: 1.5rem 0;
}

.example-box.playful h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.primary-link {
  display: inline-block;
  margin: 0.6rem 0;
  padding: 0.45rem 0.9rem;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}

.primary-link:hover {
  opacity: 0.9;
}

.warning-text {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  opacity: 0.85;
}



.image-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.image-pair img {
  width: 100%;
  max-width: 60%;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.image-pair figure {
  margin: 0;
  text-align: center;
}

.image-pair figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
}


@media (max-width: 700px) {
  .image-pair {
    grid-template-columns: 1fr;
  }
}

.primary-link {
  display: inline-block;
  margin-right: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  background: rgba(11,116,222,0.08);
  color: var(--primary);
  text-decoration: none;
}

body.dark .primary-link {
  background: rgba(59,130,246,0.15);
}

.attack-flow {
  text-align: center;
}

.guide-complete{
  display:flex;
  align-items:center;
  gap:0.6rem;
  padding:0.75rem;
  border:1px solid var(--border);
  border-radius:10px;
  background: var(--card-bg);
}


.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

@media (max-width: 800px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

.profile-left{
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


.guide-checklist {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.6rem;
}

.check-item {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

body.dark .check-item {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.check-item input {
  margin-top: 0.2rem;
}

.check-item a {
  text-decoration: none;
}

.check-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.check-meta small {
  opacity: 0.75;
}

.xp-bar {
  height: 10px;
  width: 100%;
  border-radius: 999px;
  background: rgba(0,0,0,0.08);
  border: 1px solid var(--border);
  overflow: hidden;
}

body.dark .xp-bar {
  background: rgba(255,255,255,0.12);
}

.xp-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.modal label {
  display: block;
  margin-bottom: 0.25rem;
}

.modal input {
  display: block;
  width: 100%;
  max-width: 300px;
}




.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.quiz-card {
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  text-align: center;
}

.quiz-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.quiz-filter {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.quiz-filter select {
  padding: .35rem .5rem;
  border-radius: 6px;
}

.quiz-page .back-btn {
  display: inline-flex !important;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}

.quiz-topbar{
  margin-bottom: .75rem;
  display: flex;
  justify-content: flex-start;
}

.auth-card a {
  color: #007bff;
  text-decoration: none;
}

.auth-card a:hover {
  text-decoration: underline;
}


#forgotPasswordLink {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}