/* Custom Styles for Coding & Art Platform */

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

/* Custom prose styles for blog content */
.prose {
    max-width: 65ch;
    font-size: 1.125rem;
    line-height: 1.75;
}

.prose h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.prose h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #4b5563;
}

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

.prose p {
    margin-bottom: 1.25rem;
    color: #374151;
}

.prose a {
    color: #6366f1;
    text-decoration: none;
    transition: all 0.2s;
}

.prose a:hover {
    color: #4f46e5;
    text-decoration: underline;
}

.prose ul, .prose ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
    color: #374151;
}

.prose img {
    margin: 2rem auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    height: auto;
}

.prose pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.7;
}

.prose code {
    background-color: #f3f4f6;
    color: #ec4899;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
}

.prose pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.875rem;
}

.prose blockquote {
    border-left: 4px solid #6366f1;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.prose th,
.prose td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
}

.prose th {
    background-color: #f9fafb;
    font-weight: 600;
}

.prose hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2rem 0;
}

/* Line clamp utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(to right, #6366f1, #ec4899);
    -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(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    border-top-color: #6366f1;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Code syntax highlighting (basic) */
.prose pre .keyword {
    color: #c678dd;
}

.prose pre .string {
    color: #98c379;
}

.prose pre .comment {
    color: #5c6370;
    font-style: italic;
}

.prose pre .function {
    color: #61afef;
}

.prose pre .number {
    color: #d19a66;
}

/* Responsive images in content */
.prose img[class*="w-"] {
    margin-left: 0;
    margin-right: 0;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #6366f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4f46e5;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .prose {
        max-width: 100%;
    }

    .prose a {
        color: #000;
        text-decoration: underline;
    }
}
