/**
 * infinidom Site - Custom Styles
 * 
 * A modern, tech-focused dark theme for the infinidom project site.
 */

/* ==========================================================================
   infinidom Framework Base Styles
   ========================================================================== */

/* App container - responsive width matching Pico's container sizing */
#app:not(.infinidom-loading),
body > div:not(.infinidom-loading) {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding: var(--pico-block-spacing-vertical) var(--pico-block-spacing-horizontal);
}

@media (min-width: 576px) {
    #app:not(.infinidom-loading),
    body > div:not(.infinidom-loading) {
        max-width: 510px;
        padding-right: 0;
        padding-left: 0;
    }
}

@media (min-width: 768px) {
    #app:not(.infinidom-loading),
    body > div:not(.infinidom-loading) {
        max-width: 700px;
    }
}

@media (min-width: 1024px) {
    #app:not(.infinidom-loading),
    body > div:not(.infinidom-loading) {
        max-width: 950px;
    }
}

@media (min-width: 1280px) {
    #app:not(.infinidom-loading),
    body > div:not(.infinidom-loading) {
        max-width: 1200px;
    }
}

@media (min-width: 1536px) {
    #app:not(.infinidom-loading),
    body > div:not(.infinidom-loading) {
        max-width: 1450px;
    }
}

/* Interactive element marker */
[data-infinidom-interactive="true"] {
    cursor: pointer;
}

/* Smooth transitions for dynamic content */
.infinidom-transition {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.infinidom-fade-in {
    animation: infinidom-fade-in 0.5s ease forwards;
}

@keyframes infinidom-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading overlay */
.infinidom-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.infinidom-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.infinidom-loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   infinidom Project Site - Dark Tech Theme
   ========================================================================== */

:root {
    /* Primary: Indigo/Purple tech aesthetic */
    --pico-primary: #6366f1;
    --pico-primary-hover: #818cf8;
    --pico-primary-focus: rgba(99, 102, 241, 0.25);
    --pico-primary-inverse: #fff;
    
    /* Code blocks */
    --pico-code-background-color: #1e1e2e;
    --pico-code-color: #cdd6f4;
    
    /* Muted text */
    --pico-muted-color: #9ca3af;
    --pico-muted-border-color: #374151;
}

/* Hero section styling */
section[id*="hero"],
.hero {
    text-align: center;
    padding: 3rem 0;
}

/* Infinity symbol accent - exclude loading screen */
#app:not(.infinidom-loading) h1:first-of-type::before {
    content: "∞ ";
    color: var(--pico-primary);
}

/* Code block enhancements */
pre {
    background: var(--pico-code-background-color);
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    border: 1px solid var(--pico-muted-border-color);
}

code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875em;
}

/* Inline code */
:not(pre) > code {
    background: rgba(99, 102, 241, 0.1);
    color: var(--pico-primary);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

/* Feature cards */
article {
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

article:hover {
    border-color: var(--pico-primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

/* Navigation enhancements */
nav a {
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--pico-primary);
}

/* Button styling */
button,
[role="button"],
input[type="submit"] {
    border-radius: 8px;
    font-weight: 500;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

button:hover,
[role="button"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Table styling */
table {
    border-collapse: collapse;
    width: 100%;
}

th {
    background: rgba(99, 102, 241, 0.1);
    font-weight: 600;
    text-align: left;
}

td, th {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* Blockquotes - for system prompt display */
blockquote {
    border-left: 4px solid var(--pico-primary);
    background: rgba(99, 102, 241, 0.05);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    font-style: normal;
}

/* Links */
a {
    color: var(--pico-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--pico-primary-hover);
    text-decoration: underline;
}

/* Section dividers */
hr {
    border: none;
    border-top: 1px solid var(--pico-muted-border-color);
    margin: 3rem 0;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

h2 {
    margin-top: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

/* Meta/subtle text */
small,
.meta {
    color: var(--pico-muted-color);
}

/* Footer */
footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--pico-muted-border-color);
    text-align: center;
    color: var(--pico-muted-color);
}

/* Grid for feature cards */
.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Badge/tag styling */
mark,
.badge {
    background: var(--pico-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Keyboard shortcut styling */
kbd {
    background: var(--pico-code-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 4px;
    padding: 0.125rem 0.5rem;
    font-family: inherit;
    font-size: 0.875em;
}

/* Animation for streaming effect */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.streaming {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Terminal-like output */
.terminal {
    background: #0d1117;
    color: #58a6ff;
    font-family: 'JetBrains Mono', monospace;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
}

.terminal::before {
    content: "$ ";
    color: #7ee787;
}
