/* NCA Evolution - Layout */

/* App Container */
.app-container {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    max-width: 540px;
    margin: 0 auto;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

/* Navigation Links Container */
.nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    margin-bottom: 0.25rem;
}

/* Back to Echohive Navigation */
.nav-back,
.nav-forward {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
    flex-shrink: 0;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    background: rgba(96, 165, 250, 0.05);
    border: 1px solid rgba(96, 165, 250, 0.1);
    width: fit-content;
}

.nav-back:hover {
    color: var(--primary);
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.2);
    transform: translateX(-2px);
}

.nav-forward:hover {
    color: var(--primary);
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.2);
    transform: translateX(2px);
}

.nav-back svg,
.nav-forward svg {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.nav-back:hover svg {
    transform: translateX(-2px);
}

.nav-forward:hover svg {
    transform: translateX(2px);
}

.nav-back-text,
.nav-forward-text {
    white-space: nowrap;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    padding: 0.5rem 0;
}

.app-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: linear-gradient(
        135deg,
        var(--primary-bright) 0%,
        var(--primary) 30%,
        var(--gold) 60%,
        var(--primary-bright) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: title-shimmer 4s ease-in-out infinite;
    filter: drop-shadow(0 0 30px var(--primary-glow));
    position: relative;
}

@keyframes title-shimmer {
    0%, 100% { background-position: 200% center; }
    50% { background-position: -200% center; }
}

.header-stats {
    display: flex;
    gap: 0.6rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    background: linear-gradient(135deg, rgba(10, 12, 18, 0.85) 0%, rgba(20, 24, 32, 0.85) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid rgba(96, 165, 250, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.stat-item:hover {
    border-color: rgba(96, 165, 250, 0.25);
    background: linear-gradient(135deg, rgba(15, 18, 25, 0.9) 0%, rgba(22, 26, 36, 0.9) 100%);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.1);
    transform: translateY(-1px);
}

.stat-label {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 0.7rem;
    opacity: 0.8;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.stat-value {
    color: var(--primary);
    font-family: var(--font-mono);
    font-weight: 800;
    text-shadow: 0 0 15px var(--primary-glow);
}

.stat-value.curators {
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
}

/* Evolution Section */
.evolution-section {
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(15, 18, 25, 0.6) 0%, rgba(22, 26, 36, 0.6) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(96, 165, 250, 0.08);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    position: relative;
}

.evolution-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.3), transparent);
}

/* Instruction */
.instruction-box {
    text-align: center;
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    background: rgba(96, 165, 250, 0.05);
    border: 1px solid rgba(96, 165, 250, 0.15);
    border-radius: 12px;
    flex-shrink: 0;
}

.instruction {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    letter-spacing: 0.02em;
}

.instruction-sub {
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 400;
}

.instruction span {
    color: var(--primary-bright);
    font-weight: 800;
    text-shadow: 0 0 15px var(--primary-glow);
}

/* Grid Container */
.grid-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 0.25rem;
}

#nca-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.7rem;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 3 / 2;
    transition: opacity 0.15s ease;
}

#nca-grid.fading {
    opacity: 0.2;
    pointer-events: none;
}

/* Footer */
.app-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
    flex-shrink: 0;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.25s ease;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.25s ease;
}

.footer-link:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.footer-link:hover::after {
    width: 100%;
}

.footer-links-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: calc(0.25rem + 3px);
}

.footer-links-bottom .footer-link {
    background: linear-gradient(135deg, rgba(10, 12, 18, 0.85) 0%, rgba(20, 24, 32, 0.85) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.footer-links-bottom .footer-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.3), transparent);
}

.footer-links-bottom .footer-link::after {
    display: none;
}

.footer-links-bottom .footer-link:hover {
    background: linear-gradient(135deg, rgba(15, 18, 25, 0.95) 0%, rgba(22, 26, 36, 0.95) 100%);
    border-color: var(--primary);
    color: var(--primary-bright);
    text-shadow: 0 0 10px var(--primary-glow);
    box-shadow:
        0 0 20px rgba(96, 165, 250, 0.2),
        0 6px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.footer-link-social {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-link-social svg {
    opacity: 0.9;
    transition: all 0.25s ease;
    width: 14px;
    height: 14px;
}

.footer-link-social:hover svg {
    opacity: 1;
    filter: drop-shadow(0 0 4px var(--primary-glow));
}

.footer-link-consulting {
    animation: subtle-pulse 3s ease-in-out infinite;
}
