/* =========================================================
   CyberSecPlayground - Spotlight Components v3.2
   CSP PoC Vault + V2Hive Config Hive
   ========================================================= */

/* =========================================================
   VAULT SPOTLIGHT
   ========================================================= */
.vault-spotlight {
    position: relative;
    padding: clamp(1.25rem, 3vw, 2.25rem);
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.92), rgba(22, 27, 34, 0.75));
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg), inset 0 0 60px rgba(88, 166, 255, 0.03);
}
[data-theme="light"] .vault-spotlight {
    background: linear-gradient(135deg, #ffffff, #f0f3f6);
}
.vault-spotlight::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.7;
    z-index: 1;
}

.vault-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding-bottom: var(--space-5);
    margin-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
}
.vault-header-title {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}
.vault-header-title .vault-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.4rem;
    background: var(--accent-soft);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    transition: transform var(--dur-base) var(--ease-spring);
}
.vault-header:hover .vault-icon { transform: scale(1.08) rotate(-5deg); }
.vault-header-title h3 {
    font-size: var(--fs-h3);
    font-weight: 700;
    margin: 0 0 0.15rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.vault-header-title p {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin: 0;
}

.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    font-size: var(--fs-2xs);
    font-weight: 600;
    background: var(--success-soft);
    border: 1px solid rgba(63, 185, 80, 0.3);
    border-radius: var(--radius-full);
    color: var(--success);
    white-space: nowrap;
}
.status-dot::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

/* Vault stats */
.vault-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(130px, 45%), 1fr));
    gap: 0.75rem;
    margin-bottom: var(--space-6);
}
.vault-stat {
    position: relative;
    padding: 1.15rem 0.9rem;
    background: var(--bg-4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--dur-base) var(--ease-out);
    overflow: hidden;
    min-width: 0;
}
[data-theme="light"] .vault-stat { background: var(--bg-4); }
.vault-stat::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, var(--accent-soft), transparent 60%);
    opacity: 0;
    transition: opacity var(--dur-base);
    pointer-events: none;
}
.vault-stat:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 20px var(--accent-glow);
}
.vault-stat:hover::before { opacity: 1; }
.vault-stat .vault-stat-icon {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    opacity: 0.6;
    line-height: 1;
    transition: transform var(--dur-base) var(--ease-spring), opacity var(--dur-base);
}
.vault-stat:hover .vault-stat-icon {
    transform: scale(1.2) rotate(-5deg);
    opacity: 0.9;
}
.vault-stat .number {
    font-size: clamp(1.3rem, 2.5vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.35rem;
    font-variant-numeric: tabular-nums;
}
.vault-stat .label {
    font-size: var(--fs-2xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* PoC section */
.poc-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-body);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}
.poc-count-badge {
    font-size: var(--fs-2xs);
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-full);
    margin-left: auto;
    white-space: nowrap;
}

.poc-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 0.75rem;
    margin-bottom: var(--space-6);
}

.poc-item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.2rem;
    background: var(--bg-4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--dur-base) var(--ease-out);
    overflow: hidden;
    min-height: 130px;
    isolation: isolate;
}
[data-theme="light"] .poc-item { background: var(--bg-4); }
.poc-item::before {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform var(--dur-base);
    z-index: 1;
}
.poc-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35), 0 0 22px var(--accent-glow);
}
.poc-item:hover::before { transform: scaleY(1); }

.poc-item .cve-id {
    font-family: var(--font-mono);
    font-size: var(--fs-2xs);
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.04em;
    padding: 0.22rem 0.6rem;
    background: var(--accent-soft);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xs);
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 0.7rem;
    text-transform: uppercase;
    transition: all var(--dur-fast);
}
.poc-item:hover .cve-id {
    background: var(--accent);
    color: var(--text-inverse);
    border-color: var(--accent);
}
.poc-item .poc-title {
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0 0 0.75rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.poc-item .poc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    font-size: var(--fs-2xs);
    color: var(--text-muted);
    padding-top: 0.7rem;
    border-top: 1px solid var(--border-subtle);
}
.poc-item .poc-meta span {
    padding: 0.18rem 0.5rem;
    background: var(--bg-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    font-weight: 500;
    transition: all var(--dur-fast);
    white-space: nowrap;
}
.poc-item .poc-meta .severity-critical { background: var(--danger-soft); color: var(--danger); border-color: rgba(248, 81, 73, 0.35); }
.poc-item .poc-meta .severity-high { background: rgba(248, 81, 73, 0.12); color: #ff7b72; border-color: rgba(248, 81, 73, 0.28); }
.poc-item .poc-meta .severity-medium { background: var(--warning-soft); color: var(--warning); border-color: rgba(210, 153, 34, 0.32); }
.poc-item .poc-meta .severity-low { background: var(--success-soft); color: var(--success); border-color: rgba(63, 185, 80, 0.32); }
.poc-item .poc-meta .lang { color: var(--accent); background: var(--accent-soft); border-color: var(--border-accent); }

/* Vault footer */
.vault-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-top: var(--space-5);
    margin-top: var(--space-2);
    border-top: 1px solid var(--border-subtle);
    font-size: var(--fs-xs);
    color: var(--text-muted);
}
.vault-footer-info {
    display: flex;
    align-items: center;
    gap: var(--space-3) var(--space-4);
    flex-wrap: wrap;
}
.vault-footer-info .info-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}
.vault-footer-info .info-item strong {
    color: var(--text-secondary);
    font-weight: 600;
}
.vault-footer .btn { flex-shrink: 0; }

/* Vault hero (vault.html) */
.vault-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-6);
    align-items: center;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-8);
    position: relative;
    overflow: hidden;
}
.vault-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 100% 0%, rgba(88, 166, 255, 0.12), transparent 55%),
        radial-gradient(circle at 0% 100%, rgba(240, 180, 41, 0.06), transparent 55%);
    pointer-events: none;
}
.vault-hero-content { position: relative; min-width: 0; }
.vault-hero-content h2 {
    font-size: var(--fs-h2);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}
.vault-hero-content p {
    color: var(--text-tertiary);
    font-size: var(--fs-small);
    max-width: 560px;
    line-height: 1.7;
}
.vault-hero-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    position: relative;
}

/* =========================================================
   V2HIVE SPOTLIGHT
   ========================================================= */
.v2hive-spotlight {
    position: relative;
    padding: clamp(1.75rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2rem);
    background:
        radial-gradient(circle at 10% 0%, rgba(240, 180, 41, 0.1), transparent 55%),
        radial-gradient(circle at 90% 100%, rgba(88, 166, 255, 0.08), transparent 55%),
        linear-gradient(135deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-align: center;
    box-shadow: var(--shadow-lg), inset 0 0 60px rgba(240, 180, 41, 0.03);
}
.v2hive-spotlight::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--grad-gold);
    opacity: 0.9;
    z-index: 1;
}
.v2hive-spotlight::after {
    content: "";
    position: absolute;
    top: 1rem; right: 1rem;
    width: 80px; height: 80px;
    background: radial-gradient(circle, var(--secondary-glow), transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    pointer-events: none;
}

.v2hive-spotlight .v2hive-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.75rem;
    background: var(--grad-gold);
    border-radius: var(--radius-xl);
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px var(--secondary-glow);
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}
.v2hive-spotlight h3 {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
}
.v2hive-spotlight h3 .accent-gold {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.v2hive-spotlight .v2hive-desc {
    color: var(--text-tertiary);
    font-size: var(--fs-small);
    max-width: 620px;
    margin: 0 auto 1.5rem;
    line-height: 1.75;
    position: relative;
    z-index: 2;
}

.v2hive-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}
.v2hive-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.95rem;
    background: var(--bg-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    transition: all var(--dur-base) var(--ease-out);
    white-space: nowrap;
}
.v2hive-stat:hover {
    border-color: var(--secondary);
    background: var(--bg-4);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(240, 180, 41, 0.18);
}
.v2hive-stat .stat-emoji {
    font-size: 1rem;
    line-height: 1;
    transition: transform var(--dur-base) var(--ease-spring);
}
.v2hive-stat:hover .stat-emoji { transform: scale(1.15) rotate(-8deg); }
.v2hive-stat .stat-text strong { color: var(--text-primary); font-weight: 700; }

.v2hive-spotlight .v2hive-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 2;
}

.v2hive-spotlight .v2hive-note {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}
.v2hive-spotlight .v2hive-note .update-pill {
    padding: 0.2rem 0.6rem;
    background: var(--bg-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: var(--fs-2xs);
    color: var(--text-secondary);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    .vault-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .vault-hero-actions { justify-content: center; }
    .vault-hero-content p { margin-inline: auto; }
}

@media (max-width: 640px) {
    .vault-header {
        flex-direction: column;
        align-items: stretch;
    }
    .vault-stats { grid-template-columns: repeat(2, 1fr); }
    .poc-list { grid-template-columns: 1fr; }
    .vault-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .vault-footer-info {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    .vault-footer .btn { width: 100%; }
    .v2hive-spotlight .v2hive-actions .btn { flex: 1 1 100%; }
}

@media (max-width: 400px) {
    .vault-stats { grid-template-columns: 1fr; }
    .poc-item { min-height: auto; padding: 1rem; }
    .v2hive-stat { font-size: var(--fs-2xs); padding: 0.45rem 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
    .v2hive-spotlight .v2hive-icon { animation: none; }
    .status-dot::before,
    .footer-meta .status::before { animation: none; }
}