/* Flask Vibe Custom Styles */
/* Complementing Tailwind with brand-specific styling */

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

/* Code blocks */
pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 2px solid #171717;
}

code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9em;
}

pre code {
    background: none;
    padding: 0;
    font-size: 0.82rem;
}

p code, li code {
    background-color: #f0e5d8;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    color: #D87757;
    font-weight: 500;
}

/* Notification system */
.notification {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
    min-width: 300px;
}

.notification-success {
    background-color: #10b981;
    color: white;
}

.notification-error {
    background-color: #ef4444;
    color: white;
}

.notification-info {
    background-color: #3b82f6;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Copy button for code blocks */
.copy-button {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    padding: 0.2rem 0.5rem;
    background-color: #D87757;
    color: #FCF7EA;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.2s;
}

.copy-button:hover {
    background-color: #171717;
}

.copy-button.copied {
    background-color: #10b981;
}

/* Code block container */
.code-block-container {
    position: relative;
    margin: 1.5rem 0;
}

/* Interactive elements */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(23, 23, 23, 0.15);
}

/* Feature cards */
.feature-card {
    border: 2px solid #171717;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: #D87757;
    box-shadow: 0 8px 16px rgba(216, 119, 87, 0.2);
}

/* Links */
a {
    transition: color 0.2s ease;
}

/* Selection */
::selection {
    background-color: #D87757;
    color: #FCF7EA;
}

/* Scrollbar (webkit) */
::-webkit-scrollbar {
    width: 12px;
}

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

::-webkit-scrollbar-thumb {
    background: #D87757;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #171717;
}

/* Loading spinner */
.spinner {
    border: 3px solid #FCF7EA;
    border-top: 3px solid #D87757;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Comparison table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border: 2px solid #171717;
}

.comparison-table th {
    background-color: #171717;
    color: #FCF7EA;
    font-weight: 700;
}

.comparison-table tr:nth-child(even) {
    background-color: #f0e5d8;
}

.comparison-table tr:hover {
    background-color: #D87757;
    color: #FCF7EA;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid #171717;
}

.badge-beginner {
    background-color: #10b981;
    color: white;
}

.badge-intermediate {
    background-color: #f59e0b;
    color: white;
}

.badge-advanced {
    background-color: #ef4444;
    color: white;
}

/* Search highlight */
.search-highlight {
    background-color: #fef08a;
    padding: 0.1rem 0.2rem;
    border-radius: 0.125rem;
}

/* Sticky table of contents */
.toc-sticky {
    position: sticky;
    top: 5rem;
}

.toc-link {
    display: block;
    padding: 0.5rem;
    color: #171717;
    transition: all 0.2s;
}

.toc-link:hover {
    color: #D87757;
    padding-left: 1rem;
}

.toc-link.active {
    color: #D87757;
    font-weight: 700;
    border-left: 3px solid #D87757;
    padding-left: 1rem;
}

/* Form inputs */
input[type="text"],
input[type="email"],
textarea,
select {
    font-family: 'IBM Plex Mono', monospace;
}

/* Focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    ring: 2px;
    ring-color: #D87757;
}

/* Tutorial grid */
.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Hero section gradient */
.hero-gradient {
    background: linear-gradient(135deg, #FCF7EA 0%, #f0e5d8 100%);
}

/* Pulse animation for CTA */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse-on-hover:hover {
    animation: pulse 2s infinite;
}

/* Timeline styles */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #D87757;
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: -1.75rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: #D87757;
    border: 3px solid #FCF7EA;
}

.timeline-year {
    font-size: 1.25rem;
    font-weight: 700;
    color: #D87757;
    margin-bottom: 0.5rem;
}

.timeline-content {
    padding-left: 1rem;
}

/* Use case grid */
.use-case-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0;
    border: 2px solid #171717;
    overflow: hidden;
}

.use-case-cell {
    padding: 1rem;
    border-right: 2px solid #171717;
    border-bottom: 2px solid #171717;
}

.use-case-cell:nth-child(3n) {
    border-right: none;
}

.use-case-header {
    background-color: #171717;
    color: #FCF7EA;
    font-weight: 700;
    text-align: center;
}

.winner-flask {
    background-color: #d4edda;
}

.winner-nextjs {
    background-color: #d1ecf1;
}

.winner-tie {
    background-color: #fff3cd;
}

/* Metric card */
.metric-card {
    border: 2px solid #171717;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(23, 23, 23, 0.15);
}

.metric-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-counter {
    font-size: 3rem;
    font-weight: 700;
    color: #D87757;
}

/* File tree styling */
.file-tree {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 1.5rem;
    border: 2px solid #171717;
    border-radius: 0 0 0.5rem 0.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
}

.file-tree .folder {
    color: #82aaff;
    font-weight: 600;
}

.file-tree .file {
    color: #c3e88d;
}

.file-tree .comment {
    color: #676e95;
    font-style: italic;
}

/* Tutorial/Markdown Content Styling (prose) */
.prose {
    color: #171717;
    font-size: 1.125rem;
    line-height: 1.75;
}

.prose h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #171717;
}

.prose h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #D87757;
    color: #171717;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #D87757;
}

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

.prose p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

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

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

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

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

.prose li > p {
    margin-bottom: 0.5rem;
}

.prose ul ul, .prose ol ul, .prose ul ol, .prose ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.prose blockquote {
    border-left: 4px solid #D87757;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #171717;
    background-color: #FCF7EA;
    padding: 1rem 1.5rem;
}

.prose blockquote p {
    margin-bottom: 0.5rem;
}

.prose strong {
    font-weight: 700;
    color: #171717;
}

.prose em {
    font-style: italic;
}

.prose a {
    color: #D87757;
    text-decoration: underline;
    font-weight: 500;
}

.prose a:hover {
    color: #171717;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1rem;
}

.prose table thead {
    background-color: #171717;
    color: #FCF7EA;
}

.prose table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
    border: 2px solid #171717;
}

.prose table td {
    padding: 0.75rem 1rem;
    border: 2px solid #171717;
}

.prose table tbody tr:nth-child(even) {
    background-color: #f0e5d8;
}

.prose table tbody tr:hover {
    background-color: rgba(216, 119, 87, 0.1);
}

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

.prose img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border: 2px solid #171717;
    border-radius: 0.5rem;
}

.prose figure {
    margin: 2rem 0;
}

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

/* Markdown checkboxes */
.prose input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Ensure proper spacing */
.prose > *:first-child {
    margin-top: 0;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .prose {
        font-size: 1rem;
    }

    .prose h1 {
        font-size: 2rem;
    }

    .prose h2 {
        font-size: 1.75rem;
    }

    .prose h3 {
        font-size: 1.5rem;
    }

    .prose table {
        font-size: 0.875rem;
    }

    .prose table th,
    .prose table td {
        padding: 0.5rem;
    }

    .use-case-grid {
        grid-template-columns: 1fr;
    }

    .use-case-cell {
        border-right: none;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline::before {
        left: 0.35rem;
    }

    .timeline-marker {
        left: -1.4rem;
    }
}
