/* Betrolla Spin Flow Theme - Custom CSS */
/* Keyframes, Animations & Prose Styling */

/* ===== BASE OVERRIDES ===== */
html {
    overflow-x: clip;
    overflow-y: auto;
    scroll-behavior: smooth;
}

body {
    overflow-x: clip;
}

/* ===== PARTICLE ANIMATIONS ===== */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: float-particle 20s infinite ease-in-out;
}

.particle-1 {
    width: 0.5rem;
    height: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.particle-2 {
    width: 0.375rem;
    height: 0.375rem;
    background: linear-gradient(135deg, #ec4899, #22d3ee);
    top: 20%;
    right: 15%;
    animation-delay: -3s;
}

.particle-3 {
    width: 0.625rem;
    height: 0.625rem;
    background: linear-gradient(135deg, #22d3ee, #6366f1);
    bottom: 30%;
    left: 20%;
    animation-delay: -6s;
}

.particle-4 {
    width: 0.25rem;
    height: 0.25rem;
    background: #6366f1;
    top: 50%;
    right: 25%;
    animation-delay: -9s;
}

.particle-5 {
    width: 0.5rem;
    height: 0.5rem;
    background: linear-gradient(135deg, #ec4899, #6366f1);
    bottom: 20%;
    right: 10%;
    animation-delay: -12s;
}

.particle-6 {
    width: 0.375rem;
    height: 0.375rem;
    background: #22d3ee;
    top: 70%;
    left: 5%;
    animation-delay: -15s;
}

@keyframes float-particle {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(6.25rem, -3.125rem) rotate(90deg);
    }
    50% {
        transform: translate(3.125rem, 6.25rem) rotate(180deg);
    }
    75% {
        transform: translate(-3.125rem, 3.125rem) rotate(270deg);
    }
}

/* ===== SPIN ANIMATION ===== */
.spin-slow {
    animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== BOUNCE ANIMATION ===== */
.bounce-slow {
    animation: bounce-slow 2s ease-in-out infinite;
}

@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-0.5rem);
    }
}

/* ===== PULSE GLOW ANIMATION ===== */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 1.25rem rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 0 2.5rem rgba(99, 102, 241, 0.6), 0 0 3.75rem rgba(236, 72, 153, 0.3);
    }
}

/* ===== TILT ELEMENT BASE ===== */
.tilt-element {
    transition: transform 0.3s ease-out;
    transform-style: preserve-3d;
}

/* ===== TABLE RESPONSIVE WRAPPER ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 100%;
}

/* ===== PROSE STYLING FOR MARKDOWN CONTENT ===== */
.prose {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 1rem;
}

.prose > * + * {
    margin-top: 1.5em;
}

/* Headings */
.prose h2 {
    color: #f1f5f9;
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5em;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
    background: linear-gradient(90deg, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prose h3 {
    color: #f1f5f9;
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 2em;
    margin-bottom: 0.75em;
}

.prose h4 {
    color: #e2e8f0;
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* First heading shouldn't have top margin */
.prose > h2:first-child,
.prose > h3:first-child,
.prose > h4:first-child {
    margin-top: 0;
}

/* Paragraphs */
.prose p {
    color: #94a3b8;
    margin-bottom: 1.25em;
}

/* Links */
.prose a {
    color: #22d3ee;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.prose a:hover {
    color: #6366f1;
    border-bottom-color: #6366f1;
}

/* Lists - Unordered */
.prose ul {
    list-style: none;
    padding-left: 0;
    margin: 1.25em 0;
}

.prose ul li {
    position: relative;
    padding-left: 1.75em;
    margin-bottom: 0.625em;
    color: #94a3b8;
}

.prose ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.625em;
    width: 0.5em;
    height: 0.5em;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    border-radius: 50%;
}

/* Lists - Ordered */
.prose ol {
    list-style: none;
    padding-left: 0;
    margin: 1.25em 0;
    counter-reset: prose-counter;
}

.prose ol li {
    position: relative;
    padding-left: 2.5em;
    margin-bottom: 0.75em;
    color: #94a3b8;
    counter-increment: prose-counter;
}

.prose ol li::before {
    content: counter(prose-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75em;
    height: 1.75em;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    border-radius: 50%;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Nested Lists */
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Blockquotes */
.prose blockquote {
    border-left: 4px solid #6366f1;
    background: rgba(99, 102, 241, 0.1);
    padding: 1.25em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 0.75rem 0.75rem 0;
    font-style: italic;
}

.prose blockquote p {
    color: #cbd5e1;
    margin-bottom: 0;
}

.prose blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables */
.prose .table-responsive {
    overflow-x: auto;
    margin: 1.5em 0;
    border-radius: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.prose thead {
    background: #0f172a;
}

.prose th {
    color: #f1f5f9;
    font-weight: 600;
    text-align: left;
    padding: 1em 1.25em;
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
}

.prose td {
    color: #94a3b8;
    padding: 0.875em 1.25em;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.prose tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.prose tbody tr:last-child td {
    border-bottom: none;
}

/* Code inline */
.prose code {
    background: rgba(99, 102, 241, 0.15);
    color: #22d3ee;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Fira Code', monospace;
}

/* Code blocks */
.prose pre {
    background: #0f172a;
    padding: 1.25em;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin: 1.5em 0;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.prose pre code {
    background: none;
    padding: 0;
    color: #e2e8f0;
}

/* Images */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 2em auto;
    display: block;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Horizontal Rule */
.prose hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #6366f1, #ec4899, transparent);
    margin: 2.5em 0;
}

/* Strong and Emphasis */
.prose strong {
    color: #f1f5f9;
    font-weight: 600;
}

.prose em {
    color: #cbd5e1;
    font-style: italic;
}

/* Mark/Highlight */
.prose mark {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(236, 72, 153, 0.3));
    color: #f1f5f9;
    padding: 0.1em 0.3em;
    border-radius: 0.25rem;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .prose {
        font-size: 0.9375rem;
    }
    
    .prose h2 {
        font-size: 1.5rem;
    }
    
    .prose h3 {
        font-size: 1.25rem;
    }
    
    .prose h4 {
        font-size: 1rem;
    }
    
    .prose ul li,
    .prose ol li {
        padding-left: 1.5em;
    }
    
    .prose ol li::before {
        width: 1.5em;
        height: 1.5em;
        font-size: 0.625rem;
    }
    
    .prose blockquote {
        padding: 1em;
    }
    
    .prose th,
    .prose td {
        padding: 0.75em;
    }
}

/* ===== SELECTION STYLING ===== */
::selection {
    background: rgba(99, 102, 241, 0.4);
    color: #f1f5f9;
}

::-moz-selection {
    background: rgba(99, 102, 241, 0.4);
    color: #f1f5f9;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 0.5rem;
    height: 0.5rem;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1, #ec4899);
    border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #818cf8, #f472b6);
}

/* ===== FOCUS STATES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #22d3ee;
    outline-offset: 2px;
}

/* ===== DETAILS/SUMMARY STYLING ===== */
details summary::-webkit-details-marker {
    display: none;
}

details summary::marker {
    display: none;
}

details[open] summary {
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

/* ===== GRADIENT TEXT HELPER ===== */
.gradient-text {
    background: linear-gradient(90deg, #6366f1, #ec4899, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== CARD HOVER EFFECTS ===== */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 1.25rem 2.5rem rgba(99, 102, 241, 0.2);
}

/* ===== LOADING SHIMMER ===== */
.shimmer {
    background: linear-gradient(90deg, 
        rgba(99, 102, 241, 0.1) 0%,
        rgba(236, 72, 153, 0.2) 50%,
        rgba(99, 102, 241, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}
