/* Custom Styles for Scripts Page */

/* Background Grid and Stars */
.background-grid {
    background: 
    linear-gradient(rgba(255, 179, 216, 0.08), rgba(0, 0, 0, 1)) center center / cover no-repeat,
    repeating-linear-gradient(to right, rgba(255, 255, 255, 0.04) 0px, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 80px),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 0px, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 80px),
    radial-gradient(ellipse at top center, rgba(255, 179, 216, 0.08), #0a0a0a 70%);
    overflow: hidden;
}

/* Floating Stars Animation */
@keyframes floatUp {
    from {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: translateY(-120vh) rotate(360deg);
        opacity: 0;
    }
}

.floating-star {
    position: absolute;
    background: linear-gradient(45deg, #FFB3D8);
    border-radius: 50%;
    pointer-events: none;
    animation: floatUp linear forwards;
    box-shadow: 0 0 10px rgba(255, 179, 216, 0.3);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #FFB3D8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff8fc7;
}

/* Smooth transitions for all interactive elements */
button,
a,
.transition-all {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced hover effects */
button:hover,
a:hover {
    transform: translateY(-1px);
}

/* Script card hover effects */
.script-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Category button active state */
.category-btn.active {
    background: #FFB3D8 !important;
    color: black !important;
}

.category-btn:not(.active) {
    border: 1px solid rgba(255, 179, 216, 0.2);
    color: rgb(255, 179, 216);
}

.category-btn:not(.active):hover {
    background: rgba(255, 179, 216, 0.1);
}

/* Status badge colors */
.status-working {
    color: rgb(74, 222, 128);
    background: rgba(34, 197, 94, 0.2);
}

.status-outdated {
    color: rgb(251, 191, 36);
    background: rgba(245, 158, 11, 0.2);
}

.status-broken {
    color: rgb(248, 113, 113);
    background: rgba(239, 68, 68, 0.2);
}

/* Modal animations */
.modal-enter {
    opacity: 0;
    transform: scale(0.95);
}

.modal-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.modal-exit {
    opacity: 1;
    transform: scale(1);
}

.modal-exit-active {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Code syntax highlighting */
.language-lua {
    color: #ffffff;
}

.language-lua .keyword {
    color: #60a5fa;
}

.language-lua .string {
    color: #4ade80;
}

.language-lua .comment {
    color: #6b7280;
    font-style: italic;
}

.language-lua .function {
    color: #f59e0b;
}

/* Enhanced focus states */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #FFB3D8;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Loading animation */
.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .script-card {
        margin-bottom: 1rem;
    }
    
    .modal-container {
        margin: 1rem;
        max-height: 90vh;
    }
    
    .background-grid {
        padding-left: 1.5rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-star {
        display: none;
    }
}

/* Custom gradient backgrounds */
.gradient-bg-1 {
    background: linear-gradient(135deg, rgba(255, 179, 216, 0.1), rgba(139, 92, 246, 0.1));
}

.gradient-bg-2 {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.5), rgba(10, 10, 10, 0.5));
}

/* Tag styling */
.tag {
    background: rgba(107, 114, 128, 0.5);
    color: rgb(156, 163, 175);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.tag-featured {
    background: rgba(255, 179, 216, 0.1);
    color: rgb(255, 179, 216);
}

/* Button variants */
.btn-primary {
    background: #FFB3D8;
    color: black;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: rgb(255, 143, 199);
    transform: scale(1.05);
}

.btn-secondary {
    border: 1px solid rgba(255, 179, 216, 0.2);
    color: rgb(255, 179, 216);
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 179, 216, 0.1);
}

/* Copy feedback animation */
.copy-success {
    animation: copyFeedback 0.3s ease;
}

@keyframes copyFeedback {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Footer styling */
footer {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 1));
    backdrop-filter: blur(10px);
}

/* Social icons hover effects */
footer a:hover {
    transform: translateY(-2px);
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(to right, #ffffff, #FFB3D8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-glossy {
  background-color: rgba(26, 26, 26, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(50px);
  position: relative;
  overflow: hidden;
}

.navbar-glossy::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05), transparent);
  transform: rotate(25deg);
  animation: shine 4s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) rotate(25deg);
    z-index: -1;
  }
  100% {
    transform: translateX(100%) rotate(25deg);
    z-index: -1;
  }
}