/* TechLog Custom Styles — CSS Variables & Dark Mode */

:root {
    /* Light theme (default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --border-color: #e2e8f0;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --card-bg: #ffffff;
    --code-bg: #f1f5f9;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --accent: #60a5fa;
    --accent-hover: #93bbfd;
    --card-bg: #1e293b;
    --code-bg: #1e293b;
}

/* HTMX indicator styles */
.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator {
    display: inline;
}
.htmx-request.htmx-indicator {
    display: inline;
}
.htmx-request .htmx-indicator-none {
    display: none;
}

/* Loading spinner */
.htmx-request .spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

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

/* Transition utilities */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Post card hover effects */
.post-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover {
    transform: translateY(-2px);
}

/* Admin styles */
.admin-sidebar-link.active {
    background-color: var(--accent);
    color: white;
}

/* Code highlighting overrides (pygments) */
.codehilite pre {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}
.codehilite {
    background: var(--code-bg);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}
