/* Mannequins Custom Style System */

:root {
    --bg-color: #0b0c10;
    --card-bg: #11131c;
    --card-border: rgba(255, 255, 255, 0.07);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.3);
    --secondary: #06b6d4;
    --secondary-glow: rgba(6, 182, 212, 0.3);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    --danger: #ef4444;
    --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 1rem;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

header {
    width: 100%;
    margin-bottom: 3rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(to right, #a78bfa, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    margin-top: 0.75rem;
}

.badge-htmx {
    color: #3d72d7;
    border-color: rgba(61, 114, 215, 0.3);
    background: rgba(61, 114, 215, 0.1);
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .col-span-full {
        grid-column: span 2;
    }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.7);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title svg {
    color: var(--primary);
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Form inputs & interactive components */
.input-group {
    margin-bottom: 1rem;
}

.input-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    width: 100%;
}

.btn:hover {
    background: #7c3aed;
    box-shadow: 0 0 12px var(--primary-glow);
}

.btn:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

/* HTMX result containers */
.result-box {
    background: rgba(0, 0, 0, 0.15);
    border: 1px dashed var(--card-border);
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 80px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 1rem;
}

/* Live Search list styling */
.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-item:last-child {
    border-bottom: none;
}

.search-name {
    color: var(--text-primary);
    font-weight: 600;
}

.search-tag {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    background: rgba(6, 182, 212, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 4px;
}

/* Stats lazy loading demo styles */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    width: 100%;
}

.stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Interactive toggles & counters */
.counter-display {
    text-align: center;
    margin-bottom: 1rem;
}

.counter-num {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.counter-buttons {
    display: flex;
    gap: 0.5rem;
}

/* HTMX Loading Indicator custom animation */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
    opacity: 1;
}

.htmx-request.htmx-indicator {
    display: inline-block;
    opacity: 1;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}

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

    100% {
        transform: rotate(360deg);
    }
}

footer {
    margin-top: auto;
    padding-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-align: center;
    width: 100%;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

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