body, html {
    background: var(--mv-bg) !important;}

html body footer.site-footer,
html body.has-fixed-footer footer.site-footer {
    position: relative !important;
    z-index: 2 !important; background: var(--mv-bg);}

/* === Deep Space Background === */
.space-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, var(--mv-bg) 0%, var(--mv-bg) 30%, var(--mv-bg) 60%, var(--mv-bg) 100%);
    overflow: hidden;}

.space-bg .star {
    position: absolute;
    border-radius: 50%;
    background: var(--mv-text);}

.space-bg .star--sm { width: 1px; height: 1px; opacity: 0.35; animation: twinkle 3s ease-in-out infinite;}
.space-bg .star--md { width: 1.5px; height: 1.5px; opacity: 0.55; animation: twinkle 4s ease-in-out infinite;}
.space-bg .star--lg { width: 2.5px; height: 2.5px; opacity: 0.8; animation: twinkle 5s ease-in-out infinite; box-shadow: 0 0 6px rgba(150, 220, 255, 0.7);}

@keyframes twinkle {
    0%, 100% { opacity: 0.15; transform: scale(0.8);}
    50% { opacity: 1; transform: scale(1.3);}
}

.space-bg .nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: nebulaPulse 20s ease-in-out infinite;}

@keyframes nebulaPulse {
    0%, 100% { transform: scale(1); opacity: 0.8;}
    50% { transform: scale(1.15); opacity: 1;}
}

.page-wrapper {
    position: relative;
    z-index: 1;}

/* === Hero === */
.dev-hero {
    position: relative;
    padding: 60px 0 20px;
    margin-bottom: 20px;
    text-align: center;}

.dev-hero-title {
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    font-weight: 900;
    margin-bottom: 16px;
    color: var(--mv-accent);}

.dev-hero-sub {
    font-size: 1.05rem; color: var(--mv-accent);
    margin-bottom: 0;}

/* === Search === */
.dev-search {
    position: relative;
    max-width: 600px;
    margin: 40px auto 50px;}

.dev-search-box {
    position: relative;
    background: rgba(12, 20, 38, 0.7);
    border: 1.5px solid rgba(110, 193, 255, 0.2);
    border-radius: 30px;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;}

.dev-search-box:focus-within {
    border-color: rgba(110, 193, 255, 0.5);
    box-shadow: var(--mv-glow);}

.dev-search-box i { font-size: 1.1rem; color: var(--mv-accent);}

.dev-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;}

.dev-search-input::placeholder { color: var(--mv-accent);}

.dev-clear-btn {
    padding: 6px 14px;
    background: rgba(110, 193, 255, 0.12);
    border: 1px solid rgba(110, 193, 255, 0.3);
    border-radius: 15px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;}

.dev-clear-btn:hover { background: rgba(110, 193, 255, 0.2);}

/* === Grid Container === */
.grid-panel {
    background: rgba(10, 18, 35, 0.5);
    border: 1px solid rgba(110, 193, 255, 0.1);
    border-radius: 28px;
    padding: 36px 28px;}

/* === Grid — 2 columns === */
.dev-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;}

@media (max-width: 1100px) {
    .dev-grid { grid-template-columns: 1fr; gap: 20px;}
}

.ps-stars-canvas {
    position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0;}

/* === Card — identic cu psihologi === */
.psy-card {
    position: relative;
    display: flex;
    flex-direction: column; background: rgba(8, 14, 30, 0.95);
    border: 1px solid rgba(110, 193, 255, 0.18);
    border-radius: 22px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.23,1,0.32,1), box-shadow 0.35s ease, border-color 0.35s ease;
    min-height: 260px;}
.psy-card-bg {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;}
.psy-card-bg::before {
    content: ''; position: absolute; top: -40%; right: -20%; width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(110, 193, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%; transition: opacity 0.5s ease;}
.psy-card:hover .psy-card-bg::before { opacity: 1.5;}
.psy-card-bg::after {
    content: ''; position: absolute; bottom: -30%; left: -15%; width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(110, 193, 255, 0.04) 0%, transparent 70%);
    border-radius: 50%;}
.psy-card-main {
    position: relative; z-index: 1; display: flex; gap: 24px; padding: 22px 24px 0; flex: 1; align-items: flex-end;}
.psy-card-photo-wrap {
    position: relative; flex-shrink: 0; width: 180px; height: 220px;}
.psy-card-photo-frame {
    width: 100%; height: 100%; border-radius: 16px 16px 0 0; border: none; overflow: hidden; position: relative;}
.psy-card-photo {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.5s cubic-bezier(0.23,1,0.32,1), filter 0.4s ease;
    filter: brightness(0.95) saturate(0.9);}
.psy-card:hover .psy-card-photo { filter: brightness(1) saturate(1);}
.psy-card-specs {
    flex: 1; display: flex; flex-direction: column; padding-top: 4px; padding-bottom: 14px; min-width: 0; align-self: flex-start;}
.psy-card-specs-title {
    font-size: 1.35rem; font-weight: 800; color: var(--text); margin-bottom: 16px;}
.psy-card-spec-list {
    display: flex; flex-direction: column; gap: 10px;}
.psy-card-spec-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    background: rgba(110, 193, 255, 0.06); border: 1px solid rgba(110, 193, 255, 0.2);
    border-radius: 14px; transition: all 0.3s ease;}
.psy-card:hover .psy-card-spec-item {
    border-color: rgba(110, 193, 255, 0.35); background: rgba(110, 193, 255, 0.1);}
.psy-card-spec-dot {
    width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex-shrink: 0; color: var(--mv-text-inverse);}
.psy-card-spec-text {
    flex: 1; font-size: 0.95rem; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.psy-card-footer {
    position: relative; z-index: 1; display: flex; align-items: center; gap: 14px;
    padding: 14px 24px; border-top: 1px solid rgba(110, 193, 255, 0.12); background: rgba(0, 0, 0, 0.15);}
.psy-card-name {
    font-size: 1.1rem; font-weight: 800; color: var(--text); flex-shrink: 1; min-width: 0;}
.psy-card-cert {
    position: absolute; top: 14px; right: 14px; z-index: 6;
    display: flex; align-items: center; gap: 5px;
    font-size: 0.75rem; font-weight: 700; color: var(--primary);}
.psy-card-cert-check {
    width: 20px; height: 20px; border-radius: 50%; background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; color: var(--mv-text-inverse); font-weight: 900;}
.psy-card-price {
    margin-left: auto; font-size: 1.15rem; font-weight: 800; color: var(--text); white-space: nowrap;}
.psy-card-price-unit { font-size: 0.7em; font-weight: 700; color: var(--muted); margin-left: 1px;}
.psy-card-book {
    flex-shrink: 0; padding: 10px 24px; background: var(--mv-accent);
    color: var(--mv-text-inverse); border: none; border-radius: 14px; font-weight: 700; font-size: 0.9rem;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.23,1,0.32,1); position: relative; overflow: hidden;}
.psy-card-book::before {
    content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0;
    background: var(--mv-elev-4); border-radius: 50%; transform: translate(-50%, -50%); transition: width 0.4s ease, height 0.4s ease;}
.psy-card-book:hover::before { width: 160px; height: 160px;}
.psy-card-book:hover {}

/* Loading */
.dev-loading {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;}

.dev-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(110, 193, 255, 0.15);
    border-top: 3px solid var(--mv-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;}

@keyframes spin { 0% { transform: rotate(0deg);} 100% { transform: rotate(360deg);} }

/* === Responsive === */
@media (max-width: 768px) {
    .dev-hero-title { font-size: 2rem;}
    .dev-hero-sub { font-size: 0.95rem;}
    .dev-hero { padding: 35px 0 15px; margin-bottom: 15px;}
    .dev-search { margin: 25px auto 35px;}
    .dev-search-box {
        background: rgba(12, 20, 38, 0.9) !important;}
    .grid-panel { padding: 20px 14px; border-radius: 20px;}
    .psy-card-main { gap: 16px; padding: 16px 16px 0;}
    .psy-card-photo-wrap { width: 140px; height: 170px;}
    .psy-card-specs-title { font-size: 1.15rem; margin-bottom: 12px;}
    .psy-card-spec-item { padding: 8px 12px;}
    .psy-card-spec-text { font-size: 0.85rem;}
    .psy-card-footer { padding: 12px 16px; gap: 10px; flex-wrap: wrap;}
    .psy-card-name { font-size: 0.95rem;}
    .psy-card-price { font-size: 1rem;}
    .psy-card-book { padding: 8px 18px; font-size: 0.85rem;}
}

@media (max-width: 600px) {
    .dev-grid { gap: 16px;}
    .psy-card { min-height: auto;}
    .psy-card-main { flex-direction: row; gap: 12px; padding: 14px 14px 0; align-items: flex-end;}
    .psy-card-photo-wrap { width: 104px; height: 140px; flex-shrink: 0;} .psy-card-photo-frame { border-radius: 12px 12px 0 0;}
    .psy-card-specs-title { font-size: 1.1rem; margin-bottom: 10px;}
    .psy-card-footer { position: static; z-index: 5; flex-wrap: wrap; justify-content: space-between; gap: 10px 8px; padding: 12px 16px 14px; align-items: center;}
    .psy-card-name { order: 1; width: 100%; text-align: center; font-size: 1rem;}
    .psy-card-cert { position: absolute; top: 12px; right: 12px; z-index: 6; padding: 0; gap: 4px; background: none; border: none; border-radius: 0; box-shadow: none; font-size: 0.68rem;}
    .psy-card-cert-check { width: 15px; height: 15px; font-size: 0.55rem;}
    .psy-card-price { order: 2; font-size: 1.05rem; text-align: left; margin: 0;}
    .psy-card-book { order: 3; width: auto; padding: 9px 20px; font-size: 0.85rem;}
    .container { padding: 0 12px;}
    .dev-hero-title { font-size: 1.6rem;}
}

@media (prefers-reduced-motion: reduce) {
    .space-bg .star, .space-bg .nebula { animation: none !important; opacity: 0.5 !important;}
}
