/* BotSpins Digital Pulse Core North Theme - Custom Styles */

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 0.625rem rgba(6, 182, 212, 0.5), 0 0 1.25rem rgba(6, 182, 212, 0.3);
    }
    50% {
        text-shadow: 0 0 1.25rem rgba(6, 182, 212, 0.8), 0 0 2.5rem rgba(6, 182, 212, 0.5);
    }
}

@keyframes border-glow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

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

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

/* Animation Utility Classes */
.animate-glow {
    animation: glow 3s ease-in-out infinite;
}

.animate-border-glow {
    animation: border-glow 2s ease-in-out infinite;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-pulse-ring {
    animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.2), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* ========================================
   GLOBAL OVERRIDES
   ======================================== */

html {
    overflow-x: clip;
    overflow-y: auto;
    scroll-behavior: smooth;
}

body {
    overflow-x: clip;
    overflow-y: auto;
    min-height: 100vh;
}

/* Selection Style */
::selection {
    background-color: rgba(6, 182, 212, 0.3);
    color: #e2e8f0;
}

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

::-webkit-scrollbar-track {
    background: #111827;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #06b6d4, #22d3ee);
    border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #22d3ee, #06b6d4);
}

/* ========================================
   TABLE RESPONSIVE WRAPPER
   ======================================== */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

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

/* ========================================
   PROSE STYLING FOR MARKDOWN CONTENT
   ======================================== */

.prose {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.75;
    max-width: 100%;
}

/* Headings */
.prose h2 {
    color: #e2e8f0;
    font-weight: 700;
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 0.125rem solid rgba(6, 182, 212, 0.3);
    line-height: 1.3;
}

.prose h3 {
    color: #22d3ee;
    font-weight: 600;
    font-size: 1.375rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

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

/* Paragraphs */
.prose p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

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

/* Links */
.prose a {
    color: #06b6d4;
    text-decoration: underline;
    text-underline-offset: 0.25em;
    transition: color 0.2s ease;
}

.prose a:hover {
    color: #22d3ee;
}

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

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

/* Lists - Unordered */
.prose ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.prose ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.prose ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 0.5rem;
    height: 0.5rem;
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
    border-radius: 50%;
}

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

.prose ol li {
    position: relative;
    padding-left: 2.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
    counter-increment: list-counter;
}

.prose ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
    color: #0a0e17;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 50%;
    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.5rem;
    margin-bottom: 0.5rem;
}

/* Blockquotes */
.prose blockquote {
    border-left: 0.25rem solid #f59e0b;
    background: rgba(30, 41, 59, 0.5);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
}

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

.prose blockquote p:first-child::before {
    content: '"';
    color: #f59e0b;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 0;
    margin-right: 0.25rem;
}

/* Tables */
.prose .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
    border: 0.0625rem solid rgba(6, 182, 212, 0.2);
}

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

.prose thead {
    background: linear-gradient(135deg, #1e293b, #111827);
}

.prose th {
    color: #06b6d4;
    font-weight: 600;
    text-align: left;
    padding: 1rem 1.25rem;
    border-bottom: 0.125rem solid rgba(6, 182, 212, 0.3);
    white-space: nowrap;
}

.prose td {
    padding: 0.875rem 1.25rem;
    border-bottom: 0.0625rem solid rgba(6, 182, 212, 0.1);
    color: #cbd5e1;
}

.prose tbody tr:hover {
    background: rgba(6, 182, 212, 0.05);
}

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

/* Code */
.prose code {
    background: rgba(30, 41, 59, 0.8);
    color: #22d3ee;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Monaco', 'Consolas', monospace;
}

.prose pre {
    background: #1e293b;
    border: 0.0625rem solid rgba(6, 182, 212, 0.2);
    border-radius: 0.5rem;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

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

/* Images */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    border: 0.0625rem solid rgba(6, 182, 212, 0.2);
}

/* Figure and Figcaption */
.prose figure {
    margin: 2rem 0;
}

.prose figcaption {
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Definition Lists */
.prose dl {
    margin: 1.5rem 0;
}

.prose dt {
    color: #e2e8f0;
    font-weight: 600;
    margin-top: 1rem;
}

.prose dd {
    color: #94a3b8;
    padding-left: 1.5rem;
    margin-top: 0.25rem;
}

/* ========================================
   COMPONENT ENHANCEMENTS
   ======================================== */

/* Button Glow Effect */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::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 ease;
}

.btn-glow:hover::before {
    left: 100%;
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 1.25rem 2.5rem -0.75rem rgba(6, 182, 212, 0.2);
}

/* Details/Summary Accordion Styling */
details summary {
    list-style: none;
}

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

details[open] summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 64rem) {
    .prose h2 {
        font-size: 1.5rem;
    }
    
    .prose h3 {
        font-size: 1.25rem;
    }
    
    .prose {
        font-size: 0.9375rem;
    }
}

@media (max-width: 48rem) {
    .prose h2 {
        font-size: 1.375rem;
        margin-top: 2rem;
    }
    
    .prose h3 {
        font-size: 1.125rem;
        margin-top: 1.5rem;
    }
    
    .prose {
        font-size: 0.9375rem;
        line-height: 1.7;
    }
    
    .prose ul li,
    .prose ol li {
        padding-left: 1.5rem;
    }
    
    .prose blockquote {
        padding: 1rem 1.25rem;
        margin: 1rem 0;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Text Balance for Headings */
.text-balance {
    text-wrap: balance;
}

/* Focus Visible Styles */
*:focus-visible {
    outline: 0.125rem solid #06b6d4;
    outline-offset: 0.125rem;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -2.5rem;
    left: 0;
    background: #06b6d4;
    color: #0a0e17;
    padding: 0.5rem 1rem;
    z-index: 100;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

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