/* BotSpins Digital Pulse Core - Custom Styles */

/* ===========================
   Base & Reset
   =========================== */
html {
    overflow-x: clip;
    overflow-y: auto;
    scroll-behavior: smooth;
}

body {
    overflow-x: clip;
}

/* ===========================
   Animation Keyframes
   =========================== */
@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 0.5rem rgba(0, 240, 255, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 1.5rem rgba(0, 240, 255, 0.8));
    }
}

@keyframes data-flow {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-0.625rem);
    }
}

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

@keyframes scan-line {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

@keyframes border-pulse {
    0%, 100% {
        border-color: rgba(0, 240, 255, 0.3);
    }
    50% {
        border-color: rgba(0, 240, 255, 0.8);
    }
}

/* ===========================
   Animated Elements
   =========================== */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.data-line {
    position: relative;
    overflow: hidden;
}

.data-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.8), transparent);
    animation: data-flow 3s ease-in-out infinite;
}

.data-line-footer {
    position: relative;
    overflow: hidden;
}

.data-line-footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 170, 0.6), transparent);
    animation: data-flow 4s ease-in-out infinite;
}

.data-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 3s ease-in-out forwards infinite alternate;
}

@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}

/* Tilt card base styles */
.tilt-card {
    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
   =========================== */
.prose {
    color: #e2e8f0;
    font-size: 1rem;
    line-height: 1.75;
    max-width: 100%;
}

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

/* Headings */
.prose h2 {
    color: #e2e8f0;
    font-size: 1.75em;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 0.125rem solid rgba(0, 240, 255, 0.3);
    position: relative;
}

.prose h2::before {
    content: '';
    position: absolute;
    bottom: -0.125rem;
    left: 0;
    width: 4rem;
    height: 0.125rem;
    background: linear-gradient(90deg, #00f0ff, #ff00aa);
}

.prose h3 {
    color: #e2e8f0;
    font-size: 1.375em;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 1.75em;
    margin-bottom: 0.75em;
}

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

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

.prose p:first-child {
    margin-top: 0;
}

/* Links */
.prose a {
    color: #00f0ff;
    text-decoration: none;
    border-bottom: 0.0625rem solid rgba(0, 240, 255, 0.3);
    transition: all 0.3s ease;
}

.prose a:hover {
    color: #00d4ff;
    border-bottom-color: #00f0ff;
}

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

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

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

.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, #00f0ff, #8b5cf6);
    border-radius: 50%;
}

.prose ol {
    list-style: none;
    padding-left: 0;
    counter-reset: list-counter;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

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

.prose ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75em;
    height: 1.75em;
    background: linear-gradient(135deg, #00f0ff, #ff00aa);
    color: #0a0e1a;
    font-weight: 700;
    font-size: 0.875em;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Blockquotes */
.prose blockquote {
    position: relative;
    padding: 1.5em 1.5em 1.5em 2em;
    margin: 1.5em 0;
    background: rgba(17, 24, 39, 0.6);
    border-left: 0.25rem solid #00f0ff;
    border-radius: 0 0.5rem 0.5rem 0;
    color: #94a3b8;
    font-style: italic;
}

.prose blockquote::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    left: 0.75rem;
    font-size: 2.5rem;
    color: #00f0ff;
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

.prose blockquote p {
    margin: 0;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.9375em;
}

.prose .table-responsive {
    overflow-x: auto;
    margin: 1.5em 0;
    border-radius: 0.5rem;
    border: 0.0625rem solid #1e3a5f;
}

.prose table thead {
    background: #111827;
}

.prose table th {
    color: #e2e8f0;
    font-weight: 600;
    text-align: left;
    padding: 0.875em 1em;
    border-bottom: 0.125rem solid #1e3a5f;
}

.prose table td {
    color: #94a3b8;
    padding: 0.75em 1em;
    border-bottom: 0.0625rem solid #1e3a5f;
}

.prose table tbody tr {
    background: #0a0e1a;
    transition: background 0.3s ease;
}

.prose table tbody tr:hover {
    background: rgba(17, 24, 39, 0.5);
}

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

/* Code */
.prose code {
    background: rgba(17, 24, 39, 0.8);
    color: #00f0ff;
    padding: 0.125em 0.375em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Fira Code', 'Consolas', monospace;
}

.prose pre {
    background: #111827;
    border: 0.0625rem solid #1e3a5f;
    border-radius: 0.5rem;
    padding: 1.25em;
    overflow-x: auto;
    margin: 1.5em 0;
}

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

/* Images */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5em 0;
    border: 0.0625rem solid #1e3a5f;
}

/* Horizontal Rule */
.prose hr {
    border: none;
    height: 0.0625rem;
    background: linear-gradient(90deg, transparent, #1e3a5f, transparent);
    margin: 2.5em 0;
}

/* ===========================
   Responsive Images
   =========================== */
img {
    max-width: 100%;
    height: auto;
}

/* ===========================
   Details/Summary (FAQ)
   =========================== */
details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

/* ===========================
   Scrollbar Styling
   =========================== */
::-webkit-scrollbar {
    width: 0.5rem;
    height: 0.5rem;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00f0ff, #ff00aa);
    border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00d4ff, #ff00aa);
}

/* ===========================
   Selection Styling
   =========================== */
::selection {
    background: rgba(0, 240, 255, 0.3);
    color: #e2e8f0;
}

/* ===========================
   Focus States
   =========================== */
a:focus-visible,
button:focus-visible {
    outline: 0.125rem solid #00f0ff;
    outline-offset: 0.125rem;
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    .prose {
        color: #000;
    }
    
    .prose a {
        color: #000;
        text-decoration: underline;
    }
}

/* ===========================
   Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
