/* ================================================================
   CANVA PHISHING DEMO - BitB Attack Educational Tool
   ================================================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --canva-purple: #7d2ae8;
  --canva-teal: #00c4cc;
  --canva-dark: #0d1117;
  --google-blue: #1a73e8;
  --google-blue-hover: #1557b0;
  --danger: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.15);
  --shadow-xl: 0 25px 60px rgba(0,0,0,0.25);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #fff;
  color: var(--canva-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== NAVBAR ==================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  height: 64px;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 36px;
}

.logo {
  cursor: pointer;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--canva-dark);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.nav-link-item:hover {
  background: var(--gray-100);
  color: var(--canva-purple);
}

.nav-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-login {
  background: none;
  border: 1px solid transparent;
  color: var(--canva-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: inherit;
  transition: all var(--transition);
}

.btn-login:hover {
  background: var(--gray-100);
}

.btn-signup {
  background: var(--canva-purple);
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(125, 42, 232, 0.3);
}

.btn-signup:hover {
  background: #6b21c0;
  box-shadow: 0 4px 12px rgba(125, 42, 232, 0.35);
  transform: translateY(-1px);
}

/* ==================== HERO ==================== */
.hero {
  text-align: center;
  padding: 80px 24px 64px;
  background: linear-gradient(180deg, #f5f0ff 0%, #eef7ff 40%, #fff 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(125,42,232,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero-line {
  display: block;
  font-size: 52px;
  font-weight: 700;
  color: var(--canva-dark);
}

.hero-gradient {
  display: block;
  font-size: 52px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--canva-purple), var(--canva-teal), #f59e0b);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero-sub {
  font-size: 18px;
  color: var(--gray-500);
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.search-bar {
  max-width: 620px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  padding: 14px 20px;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.search-bar:focus-within {
  border-color: var(--canva-purple);
  box-shadow: 0 0 0 3px rgba(125,42,232,0.1), var(--shadow-md);
}

.search-icon {
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--canva-dark);
  background: transparent;
}

.search-bar input::placeholder {
  color: var(--gray-400);
}

.suggestions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.suggestions > span {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

.suggestion-pill {
  background: #fff;
  border: 1px solid var(--gray-200);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  color: var(--gray-700);
  transition: all var(--transition);
}

.suggestion-pill:hover {
  background: #f5f0ff;
  border-color: var(--canva-purple);
  color: var(--canva-purple);
  transform: translateY(-1px);
}

/* ==================== QUICK ACTIONS ==================== */
.quick-actions {
  padding: 0 32px;
  margin-top: -20px;
  position: relative;
  z-index: 5;
}

.quick-actions-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  width: 110px;
}

.quick-action-card:hover {
  background: var(--gray-50);
  transform: translateY(-2px);
}

.qa-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}

.quick-action-card:hover .qa-icon {
  transform: scale(1.08);
  box-shadow: var(--shadow-lg);
}

.quick-action-card span {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-700);
}

/* ==================== TEMPLATES ==================== */
.templates {
  padding: 60px 32px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.templates-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.templates-header h2 {
  font-size: 26px;
  font-weight: 700;
}

.see-all {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--canva-purple);
  text-decoration: none;
  transition: gap var(--transition);
}

.see-all:hover {
  gap: 8px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

.template-card {
  border-radius: var(--radius-lg);
  height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.card-bg {
  position: absolute;
  inset: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.template-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.template-card:hover .card-bg {
  transform: scale(1.05);
}

.card-inner {
  position: relative;
  z-index: 1;
  padding: 20px 16px 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.5) 0%, transparent 100%);
}

.card-icon {
  margin-bottom: 12px;
  opacity: 0.85;
}

.template-label {
  display: block;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 3px;
}

.template-size {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
}

/* ==================== FEATURES STRIP ==================== */
.features-strip {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 48px 32px;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.feature-item strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--canva-dark);
}

.feature-item p {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ==================== FOOTER ==================== */
.footer {
  background: var(--gray-900);
  color: #fff;
  padding: 48px 32px 24px;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--gray-300);
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--gray-500);
}

/* ==================== OVERLAY ==================== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  animation: overlayIn 0.2s ease;
}

.overlay.active {
  display: block;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==================== LOGIN MODAL ==================== */
.login-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 440px;
  max-width: 92vw;
  z-index: 100;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.login-modal.active {
  display: block;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  padding: 6px;
  border-radius: 50%;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--canva-dark);
  background: var(--gray-100);
}

.modal-header {
  text-align: center;
  margin-bottom: 28px;
}

.modal-header h2 {
  font-size: 21px;
  font-weight: 700;
  margin: 18px 0 8px;
  color: var(--canva-dark);
}

.modal-header p {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.5;
}

.social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 10px;
  font-family: inherit;
  color: var(--canva-dark);
  transition: all var(--transition);
}

.social-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
}

.google-btn:hover {
  background: #f0f7ff;
  border-color: #4285F4;
}

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.divider span {
  font-size: 12px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.terms {
  font-size: 12px;
  color: var(--gray-400);
  text-align: center;
  margin-top: 18px;
  line-height: 1.6;
}

.terms a {
  color: var(--canva-purple);
  text-decoration: none;
}

.terms a:hover {
  text-decoration: underline;
}

/* ==================== LOADING OVERLAY ==================== */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  justify-content: center;
  align-items: center;
}

.loading-overlay.active {
  display: flex;
}

.spinner-ring {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== FAKE BROWSER (BitB) ==================== */
.bitb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 200;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.bitb-overlay.active {
  display: flex;
}

.fake-browser {
  width: 480px;
  max-width: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.1);
  animation: browserOpen 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

@keyframes browserOpen {
  from {
    transform: scale(0.8) translateY(40px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* ---- Minimal Popup Header ---- */
.popup-header {
  background: #f1f3f4;
  padding: 10px 14px;
  border-bottom: 1px solid #e0e0e0;
  cursor: default;
  user-select: none;
}

.popup-url-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 20px;
  padding: 7px 14px;
  border: 1px solid #dfe1e5;
}

.lock-icon {
  flex-shrink: 0;
}

.url-text {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.url-origin {
  color: #202124;
}

.url-path {
  color: #5f6368;
}

/* ---- Google Sign-In Content ---- */
.google-signin {
  padding: 40px 44px 36px;
  min-height: 400px;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}

.google-content {
  width: 100%;
  position: relative;
}

.signin-step {
  animation: stepIn 0.35s ease;
}

.signin-step.hidden {
  display: none;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.google-logo-svg {
  margin-bottom: 4px;
}

.google-heading {
  font-size: 24px;
  font-weight: 400;
  color: #202124;
  margin: 16px 0 6px;
  font-family: 'Google Sans', 'Inter', Arial, sans-serif;
}

.google-subheading {
  font-size: 16px;
  color: #5f6368;
  margin-bottom: 28px;
}

/* Google-style floating label input */
.g-input-wrap {
  position: relative;
  margin-bottom: 2px;
}

.g-input-wrap input {
  width: 100%;
  padding: 14px 14px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  color: #202124;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
}

.g-input-wrap input:focus {
  border-color: var(--google-blue);
  border-width: 2px;
  padding: 13px 13px;
  box-shadow: none;
}

.g-input-wrap label {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  font-size: 16px;
  color: #5f6368;
  pointer-events: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
  padding: 0 4px;
  line-height: 1;
}

.g-input-wrap input:focus + label,
.g-input-wrap input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 12px;
  color: var(--google-blue);
}

.g-link {
  display: inline-block;
  font-size: 14px;
  color: var(--google-blue);
  text-decoration: none;
  font-weight: 500;
  margin: 10px 0 0;
}

.g-link:hover {
  text-decoration: underline;
}

.g-info {
  font-size: 13px;
  color: #5f6368;
  line-height: 1.6;
  margin: 20px 0 36px;
}

.g-info a {
  color: var(--google-blue);
  text-decoration: none;
}

.g-info a:hover {
  text-decoration: underline;
}

.g-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.g-btn-next {
  background: var(--google-blue);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.025em;
  transition: background var(--transition), box-shadow var(--transition);
}

.g-btn-next:hover {
  background: var(--google-blue-hover);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.12);
}

/* ---- Password Step ---- */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dadce0;
  border-radius: 20px;
  padding: 4px 14px 4px 4px;
  margin: 10px 0 28px;
  font-size: 14px;
  color: #5f6368;
  cursor: pointer;
  transition: background var(--transition);
}

.user-chip:hover {
  background: var(--gray-50);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--google-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* ==================== WARNING REVEAL ==================== */
.warning-reveal {
  text-align: center;
  animation: warningPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes warningPop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.warning-shield {
  margin-bottom: 8px;
  animation: shieldPulse 2s ease-in-out infinite;
}

@keyframes shieldPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.warning-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 16px;
}

.captured-data {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: left;
}

.captured-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  gap: 8px;
}

.captured-row + .captured-row {
  border-top: 1px solid #fecaca;
  margin-top: 4px;
  padding-top: 9px;
}

.captured-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.captured-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--danger);
  word-break: break-all;
  text-align: right;
}

.warning-explain {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 16px;
}

.warning-tips {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  margin-bottom: 14px;
}

.warning-tips h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.warning-tips ul {
  list-style: none;
  padding: 0;
}

.warning-tips li {
  font-size: 13px;
  color: var(--gray-700);
  padding: 5px 0 5px 20px;
  position: relative;
  line-height: 1.5;
}

.warning-tips li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 6px;
  background: var(--danger);
  border-radius: 50%;
}

.warning-bottom {
  font-size: 15px;
  font-weight: 700;
  color: var(--danger);
  margin-top: 4px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .navbar { padding: 0 16px; }
  .hero { padding: 48px 16px 40px; }
  .hero-line, .hero-gradient { font-size: 34px; }
  .template-grid { grid-template-columns: repeat(2, 1fr); }
  .login-modal { padding: 28px 24px; width: 95vw; }
  .google-signin { padding: 28px 24px; }
  .quick-actions-inner { gap: 4px; }
  .quick-action-card { width: 80px; padding: 12px 8px; }
  .qa-icon { width: 44px; height: 44px; }
  .features-strip { flex-direction: column; gap: 24px; padding: 32px 24px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .fake-browser { width: 100%; }
}
