/* Particle Animation */
.particle-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle-container::before,
.particle-container::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(34, 211, 238, 0.6);
    border-radius: 50%;
    animation: particle-float 15s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.8);
}

.particle-container::before {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle-container::after {
    top: 60%;
    right: 15%;
    animation-delay: 5s;
}

@keyframes particle-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translate(100px, -100px) scale(1.5);
        opacity: 0.8;
    }
    90% {
        opacity: 1;
    }
}

/* Tilt Card Animation */
.tilt-card {
    transition: transform 0.3s ease;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-5px);
}

/* Prose Styling for Markdown Content */
.prose {
    color: #e2e8f0;
    max-width: 100%;
}

.prose h2 {
    color: #22d3ee;
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.prose h3 {
    color: #67e8f9;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.prose h4 {
    color: #a5f3fc;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    color: #cbd5e1;
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.prose a {
    color: #22d3ee;
    text-decoration: none;
    transition: color 0.2s ease;
}

.prose a:hover {
    color: #67e8f9;
    text-decoration: underline;
}

.prose ul,
.prose ol {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 1.75rem;
    color: #cbd5e1;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.prose li::marker {
    color: #22d3ee;
}

.prose strong {
    color: #f1f5f9;
    font-weight: 600;
}

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

.prose blockquote {
    border-left: 4px solid #22d3ee;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #94a3b8;
    background: rgba(34, 211, 238, 0.05);
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.prose table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #1e293b;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.2);
}

.prose thead {
    background: #0f172a;
}

.prose thead th {
    color: #22d3ee;
    font-weight: 600;
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 2px solid rgba(34, 211, 238, 0.3);
}

.prose tbody td {
    padding: 0.875rem 1rem;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(34, 211, 238, 0.1);
}

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

.prose tbody tr:hover {
    background: rgba(34, 211, 238, 0.05);
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 2rem 0;
    border: 2px solid rgba(34, 211, 238, 0.2);
}

.prose code {
    background: rgba(34, 211, 238, 0.1);
    color: #22d3ee;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.9375em;
    font-family: 'Courier New', monospace;
}

.prose pre {
    background: #0f172a;
    padding: 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgba(34, 211, 238, 0.2);
}

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

.prose hr {
    border: none;
    border-top: 1px solid rgba(34, 211, 238, 0.2);
    margin: 2.5rem 0;
}

/* Table Responsive Wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
}

/* Ensure tables never have overflow hidden */
.prose table,
table {
    overflow-x: visible !important;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .prose h2 {
        font-size: 1.625rem;
    }
    
    .prose h3 {
        font-size: 1.375rem;
    }
    
    .prose p,
    .prose li {
        font-size: 1rem;
    }
    
    .prose table {
        font-size: 0.875rem;
    }
    
    .prose thead th,
    .prose tbody td {
        padding: 0.625rem 0.75rem;
    }
}

/* Utility: Prevent overflow issues on small screens */
@media (max-width: 640px) {
    .table-responsive {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
