/* ====================================================================
   놀이광장 信 — styles.css (v5 리뉴얼, 2026-04-27)
   - 법률사무소 信(jsulaw.co.kr) 메인 홈페이지 v5 디자인 포팅
   - 보라 그라데이션 톤 유지 (메인과 시각 차별화)
   - 글래스모피즘 카드 시스템
   - 반응형 배경 분기 (모바일/데스크탑)
   ==================================================================== */

/* CSS 변수 — 디자인 토큰 */
:root {
    --primary: #8b5cf6;
    --primary-dark: #6366f1;
    --primary-light: #ec4899;
    --bg-base: #d4e8d3;  /* 옅은 잔디톤 — 새 배경(공원 산책) 톤 일치 */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --card-bg-mobile: rgba(255, 255, 255, 0.42);
    --card-bg-desktop: rgba(250, 248, 243, 0.72);
    --card-border: rgba(255, 255, 255, 0.45);
    --shadow-card: 0 4px 14px rgba(13, 31, 61, 0.18);
    --shadow-card-desktop: 0 6px 18px rgba(13, 31, 61, 0.25);
    --hot-color: #ef4444;
    --new-color: #10b981;
    --max-width: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-base);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ====================================================================
   배경 레이어 — 모바일 기본 (0~1023px)
   ==================================================================== */
.bg-layer {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-image: url('bg-mobile.png');
    background-image: -webkit-image-set(
        url('bg-mobile.webp') type('image/webp'),
        url('bg-mobile.png') type('image/png'));
    background-image: image-set(
        url('bg-mobile.webp') type('image/webp'),
        url('bg-mobile.png') type('image/png'));
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    will-change: transform;
    pointer-events: none;
}

/* 信 한자 — 보라 그라데이션 */
.hanja-shin {
    font-family: 'Zhi Mang Xing', cursive !important;
    font-size: 1.4em !important;
    font-weight: 400 !important;
    display: inline-block;
    margin: 0 0.05em;
    line-height: 1;
    vertical-align: baseline;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.7));
    position: relative;
    top: 0.08em;
}

/* ====================================================================
   헤더 — 글래스모피즘
   ==================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    background: rgba(139, 92, 246, 0.12);
    color: var(--primary-dark);
    text-decoration: none;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.header-back-link:hover {
    background: rgba(139, 92, 246, 0.22);
    transform: translateX(-2px);
}

.header-back-link i { font-size: 0.9em; }

.back-link-short { display: none; }

.header-title-wrap {
    flex: 1;
    text-align: center;
}

.site-title-main {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.site-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.subtitle-link {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
}

.subtitle-link:hover { text-decoration: underline; }

/* ====================================================================
   메인 콘텐츠
   ==================================================================== */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
}

.intro-section {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(13, 31, 61, 0.1);
}

.intro-text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.intro-link {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed rgba(99, 102, 241, 0.4);
}

.intro-link:hover {
    border-bottom-style: solid;
    border-bottom-color: var(--primary-dark);
}

/* ====================================================================
   GNB
   ==================================================================== */
.gnb-wrapper {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 14px;
    padding: 0.5rem 0.8rem;
    margin-bottom: 1.8rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.gnb-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.gnb-nav {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}

.gnb-link {
    padding: 0.45rem 0.85rem;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.gnb-link:hover {
    background: rgba(139, 92, 246, 0.12);
    color: var(--primary-dark);
}

.gnb-label-short { display: none; }

.gnb-filters {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}

.filter-btn {
    padding: 0.4rem 0.7rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.filter-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.hot-dot { background: var(--hot-color); }
.new-dot { background: var(--new-color); }

/* ====================================================================
   섹션 헤더
   ==================================================================== */
.section-header {
    margin-bottom: 1rem;
    padding-left: 0.4rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

/* ====================================================================
   서비스 카드 그리드 (글래스모피즘)
   ==================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.service-card {
    position: relative;
    background: var(--card-bg-mobile);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem 0.6rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(13, 31, 61, 0.22);
    border-color: rgba(139, 92, 246, 0.5);
}

.service-card .service-icon {
    font-size: 1.7rem;
    margin-bottom: 0.45rem;
    color: var(--primary-dark);
}

.service-card .service-title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: pre-line;
}

/* 카드 배지 */
.service-card .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-card .badge.hot { background: var(--hot-color); }
.service-card .badge.new { background: var(--new-color); }

/* 즐겨찾기 별 */
.service-card .fav-star {
    position: absolute;
    top: 6px;
    left: 6px;
    color: rgba(0, 0, 0, 0.15);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.service-card .fav-star.active {
    color: #fbbf24;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
}

/* ====================================================================
   트러스트 밴드
   ==================================================================== */
.trust-band {
    margin-top: 3rem;
    padding: 1.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(13, 31, 61, 0.12);
}

.trust-band-title {
    font-family: 'NanumMyeongjo', 'MaruBuri', serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.trust-band-prose {
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--text-primary);
    margin: 0.7rem 0;
    text-align: left;
}

.trust-band-link {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
}

.trust-band-link:hover {
    border-bottom-color: var(--primary-dark);
    border-bottom-width: 2px;
}

/* ====================================================================
   푸터 — 메인 사이트 CTA
   ==================================================================== */
.footer {
    margin-top: 4rem;
    padding: 2rem 1rem 1.5rem;
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.85);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.4);
    transition: all 0.25s ease;
    margin-bottom: 1.5rem;
}

.footer-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(139, 92, 246, 0.5);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.2s ease;
}

.footer-links a:hover { color: #fff; }

.footer-copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    margin: 0;
}

.copyright-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
}

/* ====================================================================
   차원 포털 (이스터에그)
   ==================================================================== */
.dimension-portal {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.45);
    transition: all 0.25s ease;
    z-index: 999;
    user-select: none;
    animation: portal-spin 12s linear infinite;
}

.dimension-portal:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.6);
}

@keyframes portal-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.dimension-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.dimension-modal.active { display: flex; }

.dimension-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem 1.8rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.dimension-icon { font-size: 3rem; margin-bottom: 0.5rem; animation: portal-spin 8s linear infinite; display: inline-block; }

.dimension-title {
    font-size: 1.3rem;
    margin: 0.5rem 0;
    color: var(--text-primary);
    font-weight: 700;
}

.dimension-message {
    font-size: 1rem;
    color: var(--primary-dark);
    font-weight: 600;
    margin: 0.5rem 0;
}

.dimension-submessage {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0.8rem 0 1.2rem;
    line-height: 1.5;
}

.dimension-buttons {
    display: flex;
    gap: 0.7rem;
    justify-content: center;
    flex-wrap: wrap;
}

.dimension-btn {
    padding: 0.7rem 1.3rem;
    border: none;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dimension-btn.cancel {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

.dimension-btn.cancel:hover { background: rgba(0, 0, 0, 0.12); }

.dimension-btn.enter {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.dimension-btn.enter:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5);
}

/* ====================================================================
   태블릿 (600~1023px)
   ==================================================================== */
@media (min-width: 600px) {
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.9rem;
    }

    .header-container { padding: 1rem 2rem; }

    .site-title-main { font-size: 1.9rem; }

    .main-content { padding: 2rem 1.5rem 4rem; }
}

/* ====================================================================
   데스크탑 (1024px+) — 배경 override + 화질 보호
   ==================================================================== */
@media (min-width: 1024px) {
    body {
        background-color: #d4e8d3;
    }

    .bg-layer {
        background-image: url('bg-desktop.jpg');
        background-position: center center;
        will-change: auto;
        image-rendering: high-quality;
        image-rendering: -webkit-optimize-contrast;
    }

    /* 데스크탑 카드 — 크림톤 70% 불투명 + backdrop-filter 제거 (디테일 보존) */
    .service-card,
    .header,
    .gnb-wrapper,
    .intro-section,
    .trust-band {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .service-card {
        background: var(--card-bg-desktop) !important;
        box-shadow: var(--shadow-card-desktop);
    }

    .service-card:hover {
        background: rgba(250, 248, 243, 0.85) !important;
    }

    .header {
        background: rgba(255, 255, 255, 0.85);
    }

    .gnb-wrapper,
    .intro-section,
    .trust-band {
        background: rgba(255, 255, 255, 0.75);
    }

    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .header-container { padding: 1.2rem 2.5rem; }

    .main-content { padding: 2.5rem 2rem 5rem; }

    .site-title-main { font-size: 2.2rem; }

    .site-subtitle { font-size: 0.92rem; }

    .gnb-link { font-size: 0.95rem; padding: 0.55rem 1rem; }

    .section-header h2 { font-size: 1.4rem; }

    .service-card .service-icon { font-size: 1.9rem; }

    .service-card .service-title { font-size: 0.88rem; }
}

/* ====================================================================
   극소 모바일 (320~479px)
   ==================================================================== */
@media (max-width: 479px) {
    .header-container {
        padding: 0.7rem 1rem;
        gap: 0.6rem;
    }

    .back-link-full { display: none; }
    .back-link-short { display: inline; }

    .gnb-label-full { display: none; }
    .gnb-label-short { display: inline; }

    .site-title-main { font-size: 1.4rem; }
    .site-subtitle { font-size: 0.72rem; }

    .gnb-wrapper { padding: 0.4rem 0.6rem; }

    .gnb-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.82rem;
    }

    .filter-btn {
        padding: 0.35rem 0.55rem;
        font-size: 0.72rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.6rem;
    }

    .service-card { padding: 0.85rem 0.5rem; min-height: 90px; }

    .service-card .service-icon { font-size: 1.5rem; }

    .service-card .service-title { font-size: 0.75rem; }

    .footer-cta-button {
        font-size: 0.92rem;
        padding: 0.75rem 1.3rem;
    }

    .footer-links { gap: 1rem; }

    .footer-links a { font-size: 0.8rem; }
}

/* ============================================================
   🌌 무한공간 이스터에그 — 신비로운 빛의 회오리
   화면 4개 구석에만 천천히 머물며 가끔 빛나며 나타난다.
   더블클릭 시 무한공간 접속 모달.
   ============================================================ */
#blackhole-easteregg {
    position: fixed;
    top: 6%;
    left: 5%;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    z-index: 9990;
    cursor: pointer;
    pointer-events: none;
    /* 밝게 빛나는 진주빛 코어 */
    background: radial-gradient(circle at 50% 50%,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(225, 240, 255, 0.85) 18%,
        rgba(180, 225, 245, 0.6) 38%,
        rgba(200, 170, 255, 0.35) 58%,
        rgba(255, 200, 235, 0.18) 78%,
        transparent 100%);
    box-shadow:
        0 0 26px 5px rgba(200, 230, 255, 0.55),
        0 0 60px 16px rgba(170, 200, 255, 0.32),
        0 0 100px 28px rgba(220, 180, 255, 0.18);
    animation:
        blackhole-corner-drift 110s ease-in-out infinite,
        blackhole-fade 24s ease-in-out infinite;
    will-change: top, left, opacity;
}

#blackhole-easteregg::before {
    /* 회오리(소용돌이) conic-gradient — 다채로운 빛의 띠 */
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(255, 255, 255, 0) 0deg,
        rgba(180, 230, 255, 0.5) 70deg,
        rgba(220, 180, 255, 0.6) 140deg,
        rgba(255, 210, 240, 0.5) 210deg,
        rgba(190, 230, 250, 0.55) 280deg,
        rgba(255, 255, 255, 0) 360deg
    );
    filter: blur(6px);
    animation: blackhole-swirl 16s linear infinite;
    z-index: -1;
    pointer-events: none;
}

#blackhole-easteregg::after {
    /* 코어 한가운데 별빛 같은 점 */
    content: '';
    position: absolute;
    inset: 38%;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.75) 45%,
        transparent 100%);
    box-shadow: 0 0 14px 3px rgba(255, 255, 255, 0.75);
    pointer-events: none;
}

@keyframes blackhole-corner-drift {
    /* 4개 구석에 길게 머물며 사이사이 천천히 이동 — 위쪽은 헤더 아래로 내림 */
    0%,  20% { top: 12%; left: 4%; }   /* 좌상 (헤더 아래) — 길게 머묾 */
    27%, 47% { top: 13%; left: 92%; }  /* 우상 (헤더 아래) */
    54%, 74% { top: 88%; left: 92%; }  /* 우하 */
    81%, 97% { top: 88%; left: 4%; }   /* 좌하 */
    100%     { top: 12%; left: 4%; }   /* 좌상 복귀 */
}

@keyframes blackhole-fade {
    /* 24초 사이클 — 보이는 구간 짧게, 안 보이는 구간 길게. 절정 밝기 ↑ */
    0%, 100% { opacity: 0; pointer-events: none; }
    8%       { opacity: 0.45; pointer-events: auto; }
    16%      { opacity: 0.95; pointer-events: auto; }
    24%      { opacity: 0.55; pointer-events: auto; }
    32%      { opacity: 0;    pointer-events: none; }
    /* 32%~68%: 36% 비중으로 완전 사라짐 */
    68%      { opacity: 0;    pointer-events: none; }
    76%      { opacity: 0.65; pointer-events: auto; }
    85%      { opacity: 0.85; pointer-events: auto; }
    93%      { opacity: 0.35; pointer-events: auto; }
}

@keyframes blackhole-swirl {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    #blackhole-easteregg {
        top: 6%;
        left: 4%;
        animation: blackhole-fade 24s ease-in-out infinite;
    }
    #blackhole-easteregg::before {
        animation: none;
    }
}

@media (max-width: 768px) {
    /* 모바일에서는 더 안쪽 구석 + 헤더 아래 */
    @keyframes blackhole-corner-drift {
        0%,  20% { top: 14%; left: 6%; }
        27%, 47% { top: 15%; left: 86%; }
        54%, 74% { top: 84%; left: 86%; }
        81%, 97% { top: 84%; left: 6%; }
        100%     { top: 14%; left: 6%; }
    }
}

/* 무한공간 접속 모달 */
.infinity-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.infinity-modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.infinity-modal {
    background: radial-gradient(circle at 30% 20%, #1a0530 0%, #0a0118 60%, #000 100%);
    border: 1px solid rgba(180, 100, 220, 0.32);
    border-radius: 18px;
    padding: 44px 36px 36px;
    max-width: 440px;
    width: 90vw;
    text-align: center;
    color: #f4f1ea;
    box-shadow:
        0 0 80px 12px rgba(120, 50, 200, 0.35),
        0 30px 80px rgba(0, 0, 0, 0.85);
    font-family: "Noto Sans KR", "Pretendard", -apple-system, sans-serif;
    transform: scale(0.92) translateY(8px);
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.infinity-modal-backdrop.active .infinity-modal {
    transform: scale(1) translateY(0);
}

.infinity-modal-icon {
    font-size: 52px;
    margin-bottom: 18px;
    display: inline-block;
    filter: drop-shadow(0 0 14px rgba(180, 100, 220, 0.65));
    animation: infinity-icon-glow 3s ease-in-out infinite;
}

@keyframes infinity-icon-glow {
    0%, 100% { filter: drop-shadow(0 0 12px rgba(180, 100, 220, 0.55)); }
    50%      { filter: drop-shadow(0 0 22px rgba(220, 150, 255, 0.85)); }
}

.infinity-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
    color: #f4f1ea;
}

.infinity-modal-desc {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #b8b3a8;
    margin-bottom: 30px;
}

.infinity-modal-desc strong {
    color: #d8b8f0;
    font-weight: 600;
}

.infinity-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.infinity-modal-btn {
    padding: 12px 28px;
    border: 1px solid rgba(180, 100, 220, 0.3);
    border-radius: 10px;
    background: transparent;
    color: #f4f1ea;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: -0.01em;
}

.infinity-modal-btn:hover {
    background: rgba(180, 100, 220, 0.15);
    border-color: rgba(180, 100, 220, 0.6);
}

.infinity-modal-btn-primary {
    background: linear-gradient(135deg, #6a1b9a 0%, #8e44ad 100%);
    border-color: transparent;
    font-weight: 600;
}

.infinity-modal-btn-primary:hover {
    background: linear-gradient(135deg, #7b1fa2 0%, #9b59b6 100%);
    box-shadow: 0 0 24px rgba(180, 100, 220, 0.55);
}

@media (max-width: 480px) {
    #blackhole-easteregg {
        width: 52px;
        height: 52px;
    }
    .infinity-modal {
        padding: 36px 24px 28px;
    }
    .infinity-modal-title { font-size: 1.1rem; }
    .infinity-modal-desc { font-size: 0.88rem; }
    .infinity-modal-btn { padding: 10px 22px; font-size: 0.88rem; }
}
