/* Custom styles for jdev.li */
.brand {
    text-decoration: none;
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-sub {
    font-size: 0.65rem;
    font-weight: normal;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

nav {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

footer {
    margin-top: 3rem;
    padding: 1rem 0;
    text-align: center;
    opacity: 0.6;
}

code {
    font-size: 0.85em;
}

/* htmx loading indicator */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Stat cards */
.stat-value {
    font-size: 2rem;
    font-weight: bold;
}

/* Auth form containers */
.auth-card {
    max-width: 400px;
    margin: 2rem auto;
}

/* Small action buttons (tables) */
.btn-sm {
    padding: 0.15rem 0.5rem;
    margin: 0;
    font-size: 0.8rem;
}

/* Text truncation for table cells */
.text-truncate {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-truncate-md {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-truncate-sm {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status indicators */
.status-active {
    color: var(--pico-ins-color);
}

.status-inactive {
    color: var(--pico-del-color);
}

.status-muted {
    color: var(--pico-muted-color);
}

.status-bold {
    font-weight: bold;
}

/* Text alignment */
.text-center {
    text-align: center;
}

/* Error/success messages */
.msg-error {
    color: var(--pico-del-color);
}

.msg-success {
    color: var(--pico-ins-color);
}

/* Compact elements (no margin) */
.compact {
    margin: 0;
}

/* Dropdown minimal */
.dropdown-compact {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.dropdown-menu-sm {
    min-width: 120px;
}

/* Compact button (nav/logout) */
.btn-compact {
    margin: 0;
    padding: 0.25rem 0.75rem;
}

/* Admin nav */
.admin-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-nav-btn {
    padding: 0.4rem 1rem;
    margin: 0;
}

/* Result card */
.result-card {
    background: var(--pico-card-background-color);
    padding: 1rem;
    border-radius: 0.5rem;
}

/* Code block breakable */
.code-break {
    word-break: break-all;
    user-select: all;
}

/* Chart sizing */
.chart-md {
    max-height: 300px;
}

.chart-sm {
    max-height: 250px;
}

/* Cookie consent banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--pico-card-background-color);
    border-top: 1px solid var(--pico-muted-border-color);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-consent-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-consent-inner p {
    margin: 0;
    font-size: 0.9rem;
}

/* Footer links */
.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--pico-muted-color);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Revoked API key row */
tr.revoked {
    opacity: 0.5;
}

/* Legal page styling */
article h2 {
    margin-top: 1.5rem;
}

/* Landing page */

/* Fade-up entrance animation */
@keyframes landing-fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing-fade-up {
    animation: landing-fade-up 0.6s ease-out both;
}

.landing-delay-1 {
    animation-delay: 0.15s;
}

.landing-delay-2 {
    animation-delay: 0.3s;
}

.landing-delay-3 {
    animation-delay: 0.45s;
}

/* Hero */
.landing-hero {
    text-align: center;
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.landing-hero > * {
    position: relative;
    z-index: 1;
}

.landing-badge {
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    margin-bottom: 1.25rem;
}

.landing-gradient-text {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1e3a5f, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-subtitle {
    font-size: 1.15rem;
    color: var(--pico-muted-color);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* URL demo visual */
.landing-url-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.landing-url-long {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--pico-muted-color);
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: line-through;
    opacity: 0.6;
}

.landing-url-arrow {
    font-size: 1.4rem;
    color: #3b82f6;
    font-weight: bold;
}

.landing-url-short {
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    border: 2px solid rgba(59, 130, 246, 0.25);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

/* CTA button */
.landing-cta-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    color: #fff;
}

/* Features */
.landing-features {
    padding: 3rem 0;
}

.landing-features h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.landing-section-subtitle {
    text-align: center;
    color: var(--pico-muted-color);
    margin-bottom: 2rem;
}

.landing-feature-card {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.landing-feature-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.landing-feature-card strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.landing-feature-card p {
    color: var(--pico-muted-color);
    font-size: 0.92rem;
    margin: 0;
}

/* Trust */
.landing-trust {
    padding: 3rem 0;
    text-align: center;
}

.landing-trust h2 {
    margin-bottom: 2rem;
}

.landing-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}

.landing-trust-item {
    padding: 1rem;
}

.landing-trust-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.landing-trust-item strong {
    display: block;
    margin-bottom: 0.35rem;
}

.landing-trust-item p {
    color: var(--pico-muted-color);
    font-size: 0.9rem;
    margin: 0;
}

/* Final CTA */
.landing-final-cta {
    text-align: center;
    padding: 3rem 2rem;
    margin: 2rem 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
}

.landing-final-cta h2 {
    color: #fff;
    margin-bottom: 0.5rem;
}

.landing-final-cta-subtitle {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
}

.landing-cta-btn-inverted {
    background: #fff;
    color: #2563eb;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.landing-cta-btn-inverted:hover {
    color: #1e40af;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .landing-gradient-text {
        font-size: 2rem;
    }

    .landing-url-demo {
        flex-direction: column;
        gap: 0.5rem;
    }

    .landing-url-arrow {
        transform: rotate(90deg);
    }

    .landing-trust-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .landing-hero {
        padding: 2.5rem 0 2rem;
    }

    .landing-features,
    .landing-trust {
        padding: 2rem 0;
    }

    .landing-final-cta {
        padding: 2rem 1.5rem;
        margin: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .landing-gradient-text {
        font-size: 1.6rem;
    }

    .landing-url-long {
        max-width: 240px;
        font-size: 0.75rem;
    }
}
