html {
  background: linear-gradient(135deg, #201f1f 0%, #292929 100%);
  min-height: 100vh;
  -webkit-overflow-scrolling: touch;
}

body {
  margin: 0;
  font-family: 'Michroma', sans-serif;
  font-size: 0.55rem;
  background: linear-gradient(135deg, #201f1f 0%, #292929 100%);
  color: #f8f5f1;
  min-height: 100vh;
  -webkit-overflow-scrolling: touch;
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {
  html, body {
    background: linear-gradient(135deg, #201f1f 0%, #292929 100%) fixed;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  .main-wrapper {
    background: transparent;
  }
}

.main-wrapper {
  max-width: 500px;
  margin: 0 auto;
  background: radial-gradient(ellipse at center top, 
    rgba(60, 60, 60, 0.2) 0%, 
    rgba(40, 40, 40, 0.6) 25%, 
    rgba(10, 10, 10, 0.8) 60%, 
    #000000 100%);
  position: relative;
  overflow: hidden;
}

.main-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, 
    rgba(8, 3, 0, 0.966) 0%, 
    transparent 50%),
    radial-gradient(circle at 80% 20%, 
    rgb(24, 24, 24) 0%, 
    transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.header {
  text-align: center;
  padding: 2.5rem 0 1.5rem 0;
}

.main-logo {
  height: 60px;
  max-width: 500px;
  width: auto;
  margin: 2rem auto 1rem auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  transition: all 0.3s ease;
}

.main-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 16px rgba(254,81,18,0.3));
}

.avatar-img {
  border-radius: 50%;
  width: 110px;
  height: 110px;
  object-fit: cover;
  object-position: center 35%;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  position: relative;
  z-index: 1001;
  margin: 0;
  animation: counter-rotate 4s linear infinite;
}

@keyframes counter-rotate {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(-360deg);
  }
}

.loader {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(45deg, transparent, transparent 40%, #fdfdfd);
  animation: animate 4s linear infinite;
  margin: 0 auto 1.2rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes animate {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
}

.loader::before {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  left: 6px;
  bottom: 6px;
  background: #181818;
  border-radius: 50%;
  z-index: 1000;
}

.loader::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  left: 6px;
  bottom: 6px;
  background: linear-gradient(45deg, transparent, transparent 40%, #ffffff);
  border-radius: 50%;
  z-index: 1000;
  filter: blur(30px);
}

.accent-gradient {
  font-family: 'Michroma', sans-serif;
  background: linear-gradient(90deg, #fe5112 0%, #ffb900 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.icon-social {
  width: 56px;
  height: 56px;
  padding: 8px;
  border-radius: 50%;
  background: rgba(35,32,28,0.7);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  border: 2px solid rgba(255,255,255,0.08);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.icon-social svg {
  color: #fe5112;
  transition: color 0.3s ease;
}

.icon-social:hover {
  background: linear-gradient(90deg, #fe5112 0%, #ffb900 100%);
  border: 2px solid #fff;
  box-shadow: 0 6px 24px rgba(254,81,18,0.18);
  transform: translateY(-2px);
}

.icon-social:hover svg {
  color: #fff;
}

.card-section {
  background: #23201c;
  border-radius: 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
  padding: 1.5rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.2rem;
}

/* Glass effect styles dla obu sekcji */
.learn.card-section,
.youtube.card-section {
  --bg-color: rgba(35, 32, 28, 0.3);
  --highlight: rgba(255, 255, 255, 0.15);
  
  position: relative;
  background: none;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}

.learn.card-section::before,
.youtube.card-section::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 1;
  backdrop-filter: blur(1px);
  filter: url(#glass-distortion) saturate(120%) brightness(1.15);
  pointer-events: none;
}

.learn.card-section::after,
.youtube.card-section::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 2;
  background: var(--bg-color);
  box-shadow: inset 1px 1px 1px var(--highlight);
  pointer-events: none;
}

.learn.card-section .glow-effect,
.youtube.card-section .glow-effect {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse 70% 50% at 90% 10%, 
    rgba(255, 255, 255, 0.25) 0%, 
    rgba(255, 255, 255, 0.15) 20%, 
    rgba(255, 255, 255, 0.08) 35%, 
    rgba(255, 255, 255, 0.03) 50%, 
    transparent 65%);
  border-radius: inherit;
  z-index: 2.5;
  pointer-events: none;
}

.learn.card-section .cta-logo-placeholder,
.learn.card-section .learn-content,
.youtube.card-section .youtube-content {
  position: relative;
  z-index: 10;
}

.learn.card-section:hover,
.youtube.card-section:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.learn.card-section:hover::after,
.youtube.card-section:hover::after {
  background: rgba(35, 32, 28, 0.4);
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.25);
}

.learn.card-section:hover .accent-gradient,
.youtube.card-section:hover .accent-gradient {
  background: linear-gradient(90deg, #ff6b2b 0%, #ffc947 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.learn.card-section .cta-logo-placeholder {
  transition: all 0.3s ease;
}

.learn-content, .youtube-content {
  flex: 1;
}

.learn-content h2, .youtube-content h2 {
  font-family: 'Michroma', sans-serif;
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 0 0 2px currentColor, 0 1px 0 currentColor;
  letter-spacing: 0.5px;
  font-style: italic;
  transform: skew(2deg);
}

.youtube-content h2 {
  text-align: center;
}

.learn-content p, .youtube-content p {
  font-family: 'Michroma', sans-serif;
  color: #e0d6c3;
  font-size: 1rem;
  margin: 0.2rem 0 0 0;
}

.youtube-content .video-embed {
  margin-top: 1rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}

footer {
  text-align: center;
  padding: 2rem 0 1rem 0;
  background: #181818;
  color: #e0d6c3;
  font-size: 0.5rem;
  letter-spacing: 1px;
  border-top: 2px solid #23201c;
}

.cta-logo-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fe5112 0%, #ffb900 100%);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.cta-logo-placeholder:hover {
  transform: rotate(10deg) scale(1.1);
  box-shadow: 0 4px 20px rgba(254, 81, 18, 0.4);
}

.cta-logo-placeholder svg {
  color: white;
}

@media (max-width: 550px) {
  .main-logo {
    height: 50px;
    width: auto;
  }
  
  .main-wrapper {
    max-width: 100vw;
    padding: 0 0rem;
  }
  
  .card-section {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 0.8rem;
    padding: 1rem 0.8rem;
  }

  .learn.card-section,
  .youtube.card-section {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
  }
  
  .cta-logo-placeholder {
    width: 48px;
    height: 48px;
  }
  
  .learn-content h2, .youtube-content h2 {
    font-size: 1.1rem;
    margin: 0 0 0.3rem 0;
  }
  
  .learn-content p, .youtube-content p {
    font-size: 0.9rem;
    margin: 0;
  }
  
  .socials {
    gap: 2rem;
  }
  
  .icon-social {
    width: 38px;
    height: 38px;
  }
  
  footer {
    padding: 0.5rem 0 0.5rem 0;
    margin: 0;
    font-size: 0.5rem;
    letter-spacing: 0.5px;
    background: #181818;
    border-top: 1px solid #23201c;
  }
}

/* ===== ANIMACJE WEJŚCIOWE ===== */

/* Początkowe stany animacji */
.animate-avatar {
  opacity: 0;
  transform: translateY(-30px) scale(0.8);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-logo {
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-socials {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-card {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-text {
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
}

.animate-text-delay {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-cta {
  opacity: 0;
  transform: scale(0.8) rotate(-5deg);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animate-video {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-footer {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Stany końcowe animacji */
.animate-avatar.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.animate-logo.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.animate-socials.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.animate-card.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.animate-text-delay.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.animate-cta.animate-in {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.animate-video.animate-in {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.animate-footer.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Dodatkowe efekty dla social icons */
.animate-socials.animate-in .icon-social {
  animation: socialBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--i, 0) * 0.1s);
}

@keyframes socialBounce {
  0% {
    transform: scale(0) rotate(180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(90deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Efekt glow dla kart podczas animacji */
.animate-card.animate-in .glow-effect {
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

/* Responsywność dla animacji */
@media (max-width: 550px) {
  .animate-avatar {
    transform: translateY(-20px) scale(0.9);
  }
  
  .animate-card {
    transform: translateY(30px) scale(0.97);
  }
  
  .animate-text {
    font-size: 1.2rem;
  }
  
  .learn-content h2, .youtube-content h2 {
    font-size: 0.85rem;
    line-height: 1.1;
  }
}

/* Przywróć hover efekt TYLKO dla ikony kalendarza */
.learn.card-section:hover .cta-logo-placeholder {
  transform: rotate(10deg) scale(1.1);
  box-shadow: 0 4px 20px rgba(254, 81, 18, 0.4);
}

