/* =============================================
   SHARED PAGES CSS – examit podstrony
   Importuje zmienne i bazę z głównego style.css
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --bg2: #0f0f1a;
  --bg3: #13131f;
  --surface: rgba(255,255,255,0.04);
  --surface2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);
  --text: #f0f0ff;
  --text2: #a0a0c0;
  --text3: #6060a0;
  --primary: #6366f1;
  --primary2: #8b5cf6;
  --accent: #ec4899;
  --green: #10b981;
  --red: #ef4444;
  --yellow: #f59e0b;
  --radius: 16px;
  --radius2: 24px;
  --shadow: 0 20px 60px rgba(0,0,0,0.5);
}

html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* =============================================
   CUSTOM CURSOR
   ============================================= */
.custom-cursor {
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.1s ease;
  mix-blend-mode: difference;
}
.custom-cursor-follower {
  width: 32px; height: 32px;
  border: 2px solid rgba(99,102,241,0.5);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9997;
  transition: transform 0.15s ease, width 0.3s, height 0.3s;
}

/* =============================================
   NAVBAR – unified
   ============================================= */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  padding: 14px 0;
  background: transparent;
}
#navbar.scrolled {
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-logo {
  display: flex; align-items: center;
  flex-shrink: 0; margin-right: auto;
}
.nav-logo img, .nav-logo-img {
  height: 36px; width: auto; object-fit: contain;
  transition: filter 0.3s, transform 0.3s;
  display: block;
}
.nav-logo:hover img, .nav-logo:hover .nav-logo-img {
  filter: drop-shadow(0 0 10px rgba(99,102,241,0.5));
  transform: scale(1.04);
}

/* auth area (both patterns) */
#navAuth, #navUser, .nav-auth-area {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: 16px;
}
#navAuth a, #navUser a {
  font-size: 0.88rem; font-weight: 500;
  color: var(--text2); transition: color 0.2s;
  text-decoration: none;
}
#navAuth a:hover, #navUser a:hover { color: var(--text); }

/* username text in navbar */
#navUserNameText {
  font-size: 0.88rem; font-weight: 500; color: var(--text2);
}

/* logout button in navbar */
.btn-logout {
  padding: 7px 16px; border-radius: 99px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text2); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.btn-logout:hover { border-color: #ef4444; color: #ef4444; }

/* links area */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.nav-links li { display: flex; align-items: center; }
.nav-links a, .nav-link {
  color: var(--text2);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
  white-space: nowrap;
  text-decoration: none;
}
.nav-links a::after, .nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #ec4899);
  border-radius: 99px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.nav-links a:hover, .nav-link:hover { color: var(--text); }
.nav-links a:hover::after, .nav-link:hover::after { transform: scaleX(1); }

/* nav action buttons */
.btn-nav, .nav-btn-nav {
  padding: 9px 20px;
  border-radius: 99px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.25s ease;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex; align-items: center;
}
.btn-nav {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  box-shadow: 0 4px 16px rgba(99,102,241,0.35);
}
.btn-nav:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99,102,241,0.5); }
.nav-btn-nav {
  color: var(--text2);
  background: transparent;
  border: none;
}
.nav-btn-nav:hover { color: var(--text); }
.nav-btn-nav.nav-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
  margin-left: 8px;
}
.nav-btn-nav.nav-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,0.5); }

/* hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
  margin-left: 16px; flex-shrink: 0;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text2); border-radius: 99px; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
  background: rgba(10,10,15,0.98);
  backdrop-filter: blur(20px);
  gap: 4px;
}
.mobile-menu a { padding: 12px 0; color: var(--text2); font-size: 1rem; border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: none; }
.btn-mobile {
  display: inline-block; margin-top: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white !important; padding: 12px 24px !important;
  border-radius: 99px; font-weight: 600; text-align: center;
  border-bottom: none !important;
}

/* responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu.open { display: flex; }
  .nav-container { padding: 0 20px; }
}

/* nav-user (dashboard) */
.nav-user { display: flex; align-items: center; gap: 12px; }
.nav-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; color: white;
  cursor: pointer; transition: all 0.3s; flex-shrink: 0;
}
.nav-user-avatar:hover { transform: scale(1.1); box-shadow: 0 0 0 3px rgba(99,102,241,0.3); }

/* =============================================
   FOOTER
   ============================================= */
.footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 32px 0; }
.footer.footer-full { padding: 80px 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.5fr 2fr; gap: 80px; margin-bottom: 60px; }
.footer-brand .nav-logo { display: block; margin-bottom: 16px; }
.footer-brand .nav-logo-img { height: 44px; }
.footer-brand p { color: var(--text2); font-size: 0.9rem; line-height: 1.7; margin-bottom: 24px; max-width: 280px; }
.footer-social { display: flex; gap: 10px; }
.social-link {
  width: 40px; height: 40px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  transition: all 0.25s ease;
}
.social-link svg { width: 18px; height: 18px; display: block; }
.social-link:hover { transform: translateY(-2px); }
.social-link.social-yt:hover { color: #ff4444; background: rgba(255,68,68,0.12); border-color: rgba(255,68,68,0.35); }
.social-link.social-fb:hover { color: #4285f4; background: rgba(66,133,244,0.12); border-color: rgba(66,133,244,0.35); }
.social-link.social-tt:hover { color: #25f4ee; background: rgba(37,244,238,0.1); border-color: rgba(37,244,238,0.3); }
.social-link.social-ig:hover { color: #e1306c; background: rgba(225,48,108,0.12); border-color: rgba(225,48,108,0.35); }
.social-btn svg { width: 18px; height: 18px; flex-shrink: 0; display: block; }
.social-btn.social-yt:hover { color: #ff4444; border-color: rgba(255,68,68,0.35); background: rgba(255,68,68,0.1); }
.social-btn.social-fb:hover { color: #4285f4; border-color: rgba(66,133,244,0.35); background: rgba(66,133,244,0.1); }
.social-btn.social-tt:hover { color: #25f4ee; border-color: rgba(37,244,238,0.3); background: rgba(37,244,238,0.08); }
.social-btn.social-ig:hover { color: #e1306c; border-color: rgba(225,48,108,0.35); background: rgba(225,48,108,0.1); }
.footer-links { display: grid; grid-template-columns: repeat(3,1fr); gap: 40px; }
.footer-col h4 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); margin-bottom: 20px; }
.footer-col a { display: block; color: var(--text2); font-size: 0.9rem; padding: 4px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-bottom p, .footer-bottom a { color: var(--text3); font-size: 0.83rem; line-height: 1; margin: 0; }
.footer-bottom a:hover { color: var(--text2); }
.footer-bottom-logo { display: flex; align-items: center; gap: 14px; }
.footer-bottom-logo img { height: 34px; opacity: 1; transition: opacity 0.2s; }
.footer-bottom-logo img:hover { opacity: 0.8; }
/* when footer is simple (no footer-top), remove border-top */
.footer:not(.footer-full) .footer-bottom { border-top: none; padding-top: 0; }

/* =============================================
   PAGE HERO (mały nagłówek podstron)
   ============================================= */
.page-hero {
  padding: 140px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.page-hero-bg .blob {
  position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none;
}
.page-hero-bg .blob-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.25), transparent 70%);
  top: -200px; right: -100px;
}
.page-hero-bg .blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(236,72,153,0.15), transparent 70%);
  bottom: -100px; left: -100px;
}
.page-hero-bg .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}
.page-hero-content { position: relative; z-index: 1; }
.page-tag {
  display: inline-block;
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  color: #a5b4fc;
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.page-subtitle { color: var(--text2); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.gradient-text {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift {
  0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%}
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  padding: 14px 28px;
  border-radius: 99px;
  font-size: 1rem;
  font-weight: 600;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 24px rgba(99,102,241,0.4);
  cursor: pointer;
  border: none;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 40px rgba(99,102,241,0.6); }
.btn-shine {
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-15deg);
  animation: shine 3s infinite;
}
@keyframes shine { 0%{left:-100%} 100%{left:200%} }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border2);
  color: var(--text); padding: 14px 28px; border-radius: 99px;
  font-size: 1rem; font-weight: 600; transition: all 0.3s ease; cursor: pointer;
}
.btn-secondary:hover { background: var(--surface); border-color: rgba(255,255,255,0.2); transform: translateY(-2px); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2); padding: 12px 24px; border-radius: 99px;
  font-size: 0.95rem; font-weight: 500; transition: all 0.3s ease; cursor: pointer;
}
.btn-outline:hover { border-color: var(--primary); color: #a5b4fc; }

/* =============================================
   FORM STYLES
   ============================================= */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s;
  outline: none;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
  background: rgba(99,102,241,0.05);
}
.form-input::placeholder { color: var(--text3); }
.form-input.error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.form-input.success { border-color: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.form-error { color: var(--red); font-size: 0.8rem; margin-top: 6px; display: none; }
.form-error.show { display: block; }
.form-hint { color: var(--text3); font-size: 0.8rem; margin-top: 6px; }

.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text3); pointer-events: none;
}
.input-icon ~ .form-input { padding-left: 44px; }
.input-toggle {
  position: absolute;
  right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text3); transition: color 0.2s;
}
.input-toggle:hover { color: var(--text2); }

/* =============================================
   ALERTS
   ============================================= */
.alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 10px;
}
.alert.show { display: flex; }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #fca5a5; }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25); color: #6ee7b7; }

/* =============================================
   SCROLL ANIMATIONS
   ============================================= */
[data-aos] {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-aos].aos-animate { opacity: 1; transform: translateY(0); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .btn-nav { display: none; }
  .hamburger { display: flex; margin-left: auto; }
  .mobile-menu.open { display: flex; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .footer-links { grid-template-columns: repeat(2,1fr); }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .footer-links { grid-template-columns: 1fr; }
}

/* =============================================
   SPINNER
   ============================================= */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.spinner.show { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   PARTICLES (shared)
   ============================================= */
.particle {
  position: absolute;
  width: 4px; height: 4px;
  background: rgba(99,102,241,0.6);
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* Kurs już w bibliotece */
.btn-owned {
  background: rgba(16, 185, 129, 0.15) !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  color: #6ee7b7 !important;
  box-shadow: none !important;
  text-align: center;
  line-height: 1.35;
}
.btn-owned:hover { filter: brightness(1.08); transform: none !important; }
.btn-owned-dashboard {
  display: block;
  margin-top: 12px;
  padding: 14px;
  text-align: center;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.btn-owned-dashboard:hover { background: rgba(16, 185, 129, 0.2); }
