@keyframes glitch {
  0%, 90%, 100% {
    transform: translate(0);
  }
  91% {
    transform: translate(-2px, 2px);
  }
  92% {
    transform: translate(-2px, -2px);
  }
  93% {
    transform: translate(2px, 2px);
  }
  94% {
    transform: translate(2px, -2px);
  }
  95% {
    transform: translate(0);
  }
}

@keyframes glitch-top {
  0%, 90%, 100% {
    clip-path: inset(0 0 100% 0);
    transform: translate(0);
  }
  91% {
    clip-path: inset(10% 0 30% 0);
    transform: translate(-2px, -2px);
  }
  92% {
    clip-path: inset(20% 0 10% 0);
    transform: translate(2px, 2px);
  }
  93% {
    clip-path: inset(30% 0 5% 0);
    transform: translate(-1px, 1px);
  }
  94% {
    clip-path: inset(5% 0 20% 0);
    transform: translate(1px, -1px);
  }
  95% {
    clip-path: inset(0 0 100% 0);
    transform: translate(0);
  }
}

@keyframes glitch-bottom {
  0%, 90%, 100% {
    clip-path: inset(100% 0 0 0);
    transform: translate(0);
  }
  91% {
    clip-path: inset(30% 0 10% 0);
    transform: translate(2px, 2px);
  }
  92% {
    clip-path: inset(10% 0 20% 0);
    transform: translate(-2px, -2px);
  }
  93% {
    clip-path: inset(5% 0 30% 0);
    transform: translate(1px, -1px);
  }
  94% {
    clip-path: inset(20% 0 5% 0);
    transform: translate(-1px, 1px);
  }
  95% {
    clip-path: inset(100% 0 0 0);
    transform: translate(0);
  }
}

.glitch-text {
  position: relative;
  animation: glitch 3s infinite !important;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.glitch-text::before {
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  clip-path: inset(0 0 0 0);
  animation: glitch-top 3s infinite;
  color: #ff00c1;
  z-index: -1;
}

.glitch-text::after {
  left: -2px;
  text-shadow: 2px 0 #00fff9;
  clip-path: inset(0 0 0 0);
  animation: glitch-bottom 3s infinite;
  color: #00fff9;
  z-index: -2;
}

.glitch-button {
  animation: glitch 3s infinite;
}

@keyframes glitch-fade {
  0%, 30%, 33%, 63%, 66%, 90%, 93% {
    transform: translate(0);
    opacity: 1;
  }
  30.3% {
    transform: translate(-2px, 2px);
    opacity: 1;
  }
  30.6% {
    transform: translate(-2px, -2px);
    opacity: 1;
  }
  30.9% {
    transform: translate(2px, 2px);
    opacity: 1;
  }
  31.2% {
    transform: translate(2px, -2px);
    opacity: 1;
  }
  63.3% {
    transform: translate(-2px, 2px);
    opacity: 1;
  }
  63.6% {
    transform: translate(-2px, -2px);
    opacity: 1;
  }
  63.9% {
    transform: translate(2px, 2px);
    opacity: 1;
  }
  64.2% {
    transform: translate(2px, -2px);
    opacity: 1;
  }
  90.3% {
    transform: translate(-2px, 2px);
    opacity: 1;
  }
  90.6% {
    transform: translate(-2px, -2px);
    opacity: 1;
  }
  90.9% {
    transform: translate(2px, 2px);
    opacity: 1;
  }
  91.2% {
    transform: translate(2px, -2px);
    opacity: 1;
  }
  93%, 100% {
    opacity: 0;
  }
}

@keyframes glitch-top-fade {
  0%, 30%, 33%, 63%, 66%, 90%, 93% {
    clip-path: inset(0 0 100% 0);
    transform: translate(0);
    opacity: 1;
  }
  30.3% {
    clip-path: inset(10% 0 30% 0);
    transform: translate(-2px, -2px);
    opacity: 1;
  }
  30.6% {
    clip-path: inset(20% 0 10% 0);
    transform: translate(2px, 2px);
    opacity: 1;
  }
  30.9% {
    clip-path: inset(30% 0 5% 0);
    transform: translate(-1px, 1px);
    opacity: 1;
  }
  31.2% {
    clip-path: inset(5% 0 20% 0);
    transform: translate(1px, -1px);
    opacity: 1;
  }
  63.3% {
    clip-path: inset(10% 0 30% 0);
    transform: translate(-2px, -2px);
    opacity: 1;
  }
  63.6% {
    clip-path: inset(20% 0 10% 0);
    transform: translate(2px, 2px);
    opacity: 1;
  }
  63.9% {
    clip-path: inset(30% 0 5% 0);
    transform: translate(-1px, 1px);
    opacity: 1;
  }
  64.2% {
    clip-path: inset(5% 0 20% 0);
    transform: translate(1px, -1px);
    opacity: 1;
  }
  90.3% {
    clip-path: inset(10% 0 30% 0);
    transform: translate(-2px, -2px);
    opacity: 1;
  }
  90.6% {
    clip-path: inset(20% 0 10% 0);
    transform: translate(2px, 2px);
    opacity: 1;
  }
  90.9% {
    clip-path: inset(30% 0 5% 0);
    transform: translate(-1px, 1px);
    opacity: 1;
  }
  91.2% {
    clip-path: inset(5% 0 20% 0);
    transform: translate(1px, -1px);
    opacity: 1;
  }
  93%, 100% {
    opacity: 0;
  }
}

@keyframes glitch-bottom-fade {
  0%, 30%, 33%, 63%, 66%, 90%, 93% {
    clip-path: inset(100% 0 0 0);
    transform: translate(0);
    opacity: 1;
  }
  30.3% {
    clip-path: inset(30% 0 10% 0);
    transform: translate(2px, 2px);
    opacity: 1;
  }
  30.6% {
    clip-path: inset(10% 0 20% 0);
    transform: translate(-2px, -2px);
    opacity: 1;
  }
  30.9% {
    clip-path: inset(5% 0 30% 0);
    transform: translate(1px, -1px);
    opacity: 1;
  }
  31.2% {
    clip-path: inset(20% 0 5% 0);
    transform: translate(-1px, 1px);
    opacity: 1;
  }
  63.3% {
    clip-path: inset(30% 0 10% 0);
    transform: translate(2px, 2px);
    opacity: 1;
  }
  63.6% {
    clip-path: inset(10% 0 20% 0);
    transform: translate(-2px, -2px);
    opacity: 1;
  }
  63.9% {
    clip-path: inset(5% 0 30% 0);
    transform: translate(1px, -1px);
    opacity: 1;
  }
  64.2% {
    clip-path: inset(20% 0 5% 0);
    transform: translate(-1px, 1px);
    opacity: 1;
  }
  90.3% {
    clip-path: inset(30% 0 10% 0);
    transform: translate(2px, 2px);
    opacity: 1;
  }
  90.6% {
    clip-path: inset(10% 0 20% 0);
    transform: translate(-2px, -2px);
    opacity: 1;
  }
  90.9% {
    clip-path: inset(5% 0 30% 0);
    transform: translate(1px, -1px);
    opacity: 1;
  }
  91.2% {
    clip-path: inset(20% 0 5% 0);
    transform: translate(-1px, 1px);
    opacity: 1;
  }
  93%, 100% {
    opacity: 0;
  }
}

.glitch-text-fade {
  position: relative;
  animation: glitch-fade 9s forwards;
}

.glitch-text-fade::before,
.glitch-text-fade::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.glitch-text-fade::before {
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  clip-path: inset(0 0 0 0);
  animation: glitch-top-fade 9s forwards;
  color: #ff00c1;
  z-index: -1;
}

.glitch-text-fade::after {
  left: -2px;
  text-shadow: 2px 0 #00fff9;
  clip-path: inset(0 0 0 0);
  animation: glitch-bottom-fade 9s forwards;
  color: #00fff9;
  z-index: -2;
}

.cyberpunk-card {
  position: relative;
  overflow: hidden;
}

.cyberpunk-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.1), transparent);
  transition: left 0.5s;
}

.cyberpunk-card:hover::before {
  left: 100%;
}

#mobile-menu ul {
  width: 100% !important;
  margin: 0 !important;
  list-style: none !important;
}

#mobile-menu li {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#mobile-menu a {
  width: 100% !important;
  display: block !important;
}

/* Modern mobile menu animations */
.mobile-menu-container {
  animation: slideDown 0.3s ease-out;
}

.mobile-menu-container.hidden {
  animation: slideUp 0.3s ease-in;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

.mobile-menu-item {
  animation: fadeInUp 0.4s ease-out backwards;
}

.mobile-menu-item:nth-child(1) {
  animation-delay: 0.05s;
}

.mobile-menu-item:nth-child(2) {
  animation-delay: 0.1s;
}

.mobile-menu-item:nth-child(3) {
  animation-delay: 0.15s;
}

.mobile-menu-item:nth-child(4) {
  animation-delay: 0.2s;
}

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

.mobile-menu-link {
  position: relative;
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.1), transparent);
  transition: left 0.5s ease;
}

.mobile-menu-link:hover::before {
  left: 100%;
}

.mobile-menu-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.15), 0 0 30px rgba(34,211,238,0.4) !important;
}

.mobile-menu-link:active {
  transform: translateY(0);
}

.prose img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
}
.prose .ql-align-justify {
    text-align: justify;
}
.prose h1 {
    font-size: 2.375rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #4c1d95;
}
.prose h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #4c1d95;
}
.prose h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #4c1d95;
}
.prose h4, .prose h5, .prose h6 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-top: 0.75rem;
    margin-bottom: 0.4rem;
    color: #4c1d95;
}

.dark .prose h1,
.dark .prose h2,
.dark .prose h3,
.dark .prose h4,
.dark .prose h5,
.dark .prose h6 {
    color: #ec4899;
}
.prose p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #1f2937;
}

.dark .prose p {
    color: #e5e7eb;
}
.prose pre, .prose .ql-syntax {
    background-color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: monospace;
    font-size: 0.95em;
    border: 1px solid #e5e7eb;
    color: #1f2937;
}

.dark .prose pre, .dark .prose .ql-syntax {
    background-color: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
}
.prose strong {
    font-weight: bold;
}
.prose em {
    font-style: italic;
}
.prose ul, .prose ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}
.prose li {
    margin-bottom: 0.5rem;
}
.prose br {
    display: none;
}
.prose p > strong:only-child,
.prose p > em:only-child,
.prose p > strong > em:only-child,
.prose p > em > strong:only-child {
    display: inline;
    margin-bottom: 0;
}
.prose p:has(> strong:only-child),
.prose p:has(> em:only-child),
.prose p:has(> strong > em:only-child),
.prose p:has(> em > strong:only-child) {
    margin-bottom: 0.2rem;
}

.hljs-copy-wrapper {
    position: relative;
}

.hljs-copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: #4b5563;
    color: #f9fafb;
    border: 1px solid #374151;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.hljs-copy-button:hover {
    background-color: #374151;
}

.hljs-copy-button[data-copied='true'] {
    background-color: #a7f3d0;
    color: #065f46;
}

/* Horizontal scrolling logo animation */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-scroll-left {
    animation: scroll-left 30s linear infinite !important;
    display: flex !important;
    width: fit-content !important;
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.animate-scroll-left:hover {
    animation-play-state: paused;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .animate-scroll-left {
        animation: none;
    }
}

/* Text scrolling animation */
@keyframes scrollText {
    0% {
        transform: translateX(100vw);
    }
    100% {
        transform: translateX(-100%);
    }
}

.animate-scroll-text {
    animation: scrollText 12s linear infinite;
}

/* Cookie Consent Button Styling - Same cyberpunk pink for both modes */
.cc-btn.cc-dismiss,
.cc-btn.cc-allow {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%) !important;
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.5), 0 4px 6px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
}

.cc-btn.cc-dismiss:hover,
.cc-btn.cc-allow:hover {
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.8), 0 6px 8px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-2px) !important;
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%) !important;
}

/* Hide the floating "Kolačići" revoke button on mobile devices */
@media (max-width: 767px) {
    .cc-revoke {
        display: none !important;
    }
}
