.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Courier New", Courier, monospace;
  color: #eee;
}

.loading-overlay.hidden {
  display: none;
}

/* ===== ANIMACJE WEJŚCIA ===== */
.loading-overlay.slide-from-corner {
  transform: translate(-100%, -100%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.loading-overlay.slide-from-corner.show {
  transform: translate(0, 0);
}

.loading-overlay.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.loading-overlay.fade-in.show {
  opacity: 1;
}

.loading-overlay.zoom-in {
  transform: scale(0.3);
  opacity: 0;
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.loading-overlay.zoom-in.show {
  transform: scale(1);
  opacity: 1;
}

.loading-overlay.slide-from-top {
  transform: translateY(-100%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.loading-overlay.slide-from-top.show {
  transform: translateY(0);
}

/* ===== ANIMACJE WYJŚCIA ===== */
.loading-overlay.closing {
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.5s ease-out;
  pointer-events: none;
}

/* ===== TŁO I LAYOUT ===== */
.overlay-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #080b14 0%, #12151e 100%);
  z-index: -1;
}

.overlay-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ===== TERMINAL STYLES ===== */
.terminal-wrapper {
  position: relative;
  width: 650px;
  max-width: 90vw;
  margin-bottom: 30px;
  perspective: 1000px;
}

.terminal {
  background-color: #11131a;
  color: #00ff9d;
  font-size: 18px;
  padding: 24px 20px 20px;
  width: 100%;
  height: 250px;
  border-radius: 10px;
  text-align: left;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 255, 157, 0.15),
    0 0 0 1px rgba(0, 255, 157, 0.1);
  transition: all 0.4s ease;
  transform-style: preserve-3d;
}

.terminal:hover {
  box-shadow: 0 15px 40px rgba(0, 255, 157, 0.2);
}

.terminal-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background-color: #1e2132;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.terminal-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
}

.terminal-red {
  background-color: #ff5f56;
}
.terminal-yellow {
  background-color: #ffbd2e;
}
.terminal-green {
  background-color: #27c93f;
}

.terminal-title {
  font-size: 12px;
  color: #aaa;
  margin-left: 10px;
}

.terminal-content {
  margin-top: 5px;
  height: calc(100% - 30px);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 157, 0.3) rgba(255, 255, 255, 0.05);
}

.terminal-content.typing {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
.terminal-content::-webkit-scrollbar {
  width: 6px;
}

.terminal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.terminal-content::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 157, 0.3);
  border-radius: 3px;
}

.terminal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 157, 0.5);
}

#code-overlay {
  margin: 0;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ===== EFEKTY SPECJALNE ===== */
.highlight-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(
    90deg,
    rgba(0, 255, 157, 0.1) 0%,
    rgba(0, 255, 157, 0.3) 50%,
    rgba(0, 255, 157, 0.1) 100%
  );
  opacity: 0.8;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background-color: rgba(0, 255, 157, 0.6);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.3;
  }
  33% {
    transform: translateY(-10px) rotate(120deg);
    opacity: 0.8;
  }
  66% {
    transform: translateY(5px) rotate(240deg);
    opacity: 0.5;
  }
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 20px;
  background-color: #00ff9d;
  animation: blink 1s infinite;
  vertical-align: middle;
  border-radius: 1px;
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== SYNTAX HIGHLIGHTING ===== */
.prompt {
  color: #00c3ff;
}
.command-line {
  color: #00ff9d;
  font-weight: bold;
}
.comment {
  color: #747a9b;
  font-style: italic;
}
.keyword {
  color: #ff79c6;
  font-weight: bold;
}
.string {
  color: #f1fa8c;
}
.variable {
  color: #50fa7b;
}
.function {
  color: #8be9fd;
}
.number {
  color: #bd93f9;
}

/* ===== PRZYCISKI ===== */
.execute-btn,
.close-btn {
  padding: 12px 30px !important;
  background: linear-gradient(135deg, #00d981 0%, #00ff9d 100%) !important;
  color: #080b14 !important;
  border: none !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  margin: 10px !important;
  font-family: "Courier New", Courier, monospace !important;
  font-size: 16px !important;
  font-weight: bold !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 4px 12px rgba(0, 217, 129, 0.5) !important;
  position: relative !important;
  overflow: hidden !important;
}

.execute-btn::before,
.close-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.execute-btn:hover::before,
.close-btn:hover::before {
  left: 100%;
}

.execute-btn:hover,
.close-btn:hover {
  background: linear-gradient(135deg, #00ff9d 0%, #00c3ff 100%) !important;
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 0 8px 20px rgba(0, 255, 157, 0.7) !important;
}

.execute-btn:active,
.close-btn:active {
  transform: translateY(-1px) scale(0.98) !important;
}

/* Skip Button */
.skip-btn {
  background: transparent !important;
  color: #747a9b !important;
  border: 1px solid #747a9b !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  margin: 10px !important;
  transition: all 0.3s ease !important;
  opacity: 0 !important;
  transform: translateY(10px) !important;
  display: none !important;
  font-family: "Courier New", Courier, monospace !important;
}

.skip-btn:hover {
  color: #00ff9d !important;
  border-color: #00ff9d !important;
  background: rgba(0, 255, 157, 0.1) !important;
  transform: translateY(8px) !important;
}

/* Enter Website Button - GŁÓWNY PRZYCISK */
.enter-website-btn,
#enter-website-overlay {
  padding: 16px 40px !important;
  background: linear-gradient(
    135deg,
    #ff6b6b 0%,
    #ff8e8e 50%,
    #ff6b6b 100%
  ) !important;
  color: white !important;
  border: none !important;
  border-radius: 50px !important;
  cursor: pointer !important;
  font-family: "Courier New", Courier, monospace !important;
  font-size: 18px !important;
  font-weight: bold !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  margin: 20px 0 !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4) !important;
  opacity: 0;
  transform: translateY(30px);
  display: none !important;
  position: relative;
  overflow: hidden;
}

.enter-website-btn::before,
#enter-website-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s;
}

.enter-website-btn:hover::before,
#enter-website-overlay:hover::before {
  left: 100%;
}

.enter-website-btn:hover,
#enter-website-overlay:hover {
  background: linear-gradient(
    135deg,
    #ff8e8e 0%,
    #ffb3b3 50%,
    #ff8e8e 100%
  ) !important;
  transform: translateY(27px) scale(1.05) !important;
  box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6) !important;
}

.enter-website-btn:active,
#enter-website-overlay:active {
  transform: translateY(29px) scale(0.98) !important;
}

/* ===== IKONY ===== */
.icon-display {
  width: 600px;
  max-width: 90vw;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
  position: relative;
}

.icon {
  font-size: 20px;
  padding: 14px 24px;
  background: linear-gradient(
    135deg,
    rgba(28, 32, 47, 0.95),
    rgba(40, 45, 65, 0.95)
  );
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  position: absolute;
  backdrop-filter: blur(10px);
  transform: scale(0.9);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid #00ff9d;
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(0, 255, 157, 0.1),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.icon:hover::before {
  opacity: 1;
}

/* ===== LOADING BAR ===== */
.loading-bar-container {
  width: 550px;
  max-width: 90vw;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 25px 0 10px;
  display: none;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.loading-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #00c3ff, #00ff9d, #00d981);
  background-size: 200% 100%;
  animation: gradient-shift 2s ease-in-out infinite;
  transition: width 3s cubic-bezier(0.19, 1, 0.22, 1);
  border-radius: 4px;
  position: relative;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.loading-glow {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 60px;
  background: linear-gradient(
    90deg,
    rgba(0, 255, 157, 0) 0%,
    rgba(0, 255, 157, 0.8) 50%,
    rgba(0, 255, 157, 0) 100%
  );
  animation: loading-glow 2s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes loading-glow {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(1000%);
  }
}

#progress-text-overlay {
  font-size: 14px;
  color: #747a9b;
  margin: 10px 0;
  display: none;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

.final-text {
  font-size: 24px;
  font-weight: 300;
  margin: 30px 0;
  opacity: 0;
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
  color: #e0e3f0;
  text-shadow: 0 2px 10px rgba(0, 255, 157, 0.2);
  transform: translateY(20px);
}

.final-text p {
  margin: 5px 0;
}

/* ===== UTILITIES ===== */
.hidden {
  display: none !important;
}

body.content-visible {
  overflow: auto;
}

/* ===== RESPONSYWNOŚĆ ===== */
@media (max-width: 768px) {
  .overlay-content {
    padding: 15px;
  }

  .terminal {
    font-size: 15px;
    height: 200px;
    padding: 20px 15px 15px;
  }

  .terminal-wrapper {
    width: 100%;
    margin-bottom: 20px;
  }

  .icon {
    font-size: 16px;
    padding: 12px 18px;
  }

  .final-text {
    font-size: 20px;
  }

  .execute-btn,
  .close-btn {
    padding: 14px 26px !important;
    font-size: 15px !important;
  }

  .enter-website-btn,
  #enter-website-overlay {
    padding: 14px 32px !important;
    font-size: 16px !important;
  }

  .particle {
    width: 2px;
    height: 2px;
  }
}

@media (max-width: 480px) {
  .terminal {
    font-size: 14px;
    height: 180px;
    padding: 18px 12px 12px;
  }

  .final-text {
    font-size: 18px;
  }

  .execute-btn,
  .close-btn {
    padding: 12px 22px !important;
    font-size: 14px !important;
  }

  .enter-website-btn,
  #enter-website-overlay {
    padding: 12px 28px !important;
    font-size: 15px !important;
  }
}
