/* @import url(https://cdn.jsdelivr.net/gh/moonspam/NanumSquareNeo@1.0/nanumsquareneo.css); */

/* 로컬 폰트 설정 (woff2 전용) */
@font-face {
    font-family: 'NanumSquareNeo';
    font-weight: 400;
    /* Regular */
    src: url('https://testconsole.snowballabs.com/font/NanumSquareNeoTTF-bRg.woff2') format('woff2');
}

@font-face {
    font-family: 'NanumSquareNeo';
    font-weight: 700;
    /* Bold */
    src: url('https://testconsole.snowballabs.com/font/NanumSquareNeoTTF-cBd.woff2') format('woff2');
}

@font-face {
    font-family: 'NanumSquareNeo';
    font-weight: 800;
    /* ExtraBold */
    src: url('https://testconsole.snowballabs.com/font/NanumSquareNeoTTF-dEb.woff2') format('woff2');
}

@font-face {
    font-family: 'NanumSquareNeo';
    font-weight: 900;
    /* Heavy */
    src: url('https://testconsole.snowballabs.com/font/NanumSquareNeoTTF-eHv.woff2') format('woff2');
}

body {
    font-family: 'NanumSquareNeo', sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
}

/* 엑스트라 볼드 유틸리티 */
.font-neo-bd {
    font-weight: 700;
}

.font-neo-eb {
    font-weight: 800;
}

.font-neo-hv {
    font-weight: 900;
}

.panel {
    background-color: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

.data-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.data-card:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
}

.loading-spinner {
    border-top-color: #6366f1;
    animation: spin 1s linear infinite;
}

.result-card {
    background-color: white;
    border: 1px solid #e2e8f0;
}

.tooltip {
    position: relative;
    cursor: help;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #1e293b;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px 12px;
    position: absolute;
    z-index: 10;
    bottom: 140%;
    left: 50%;
    margin-left: -110px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    /* text-xs */
    line-height: 1.5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* AI 결과물 스타일 커스텀 */
.prose-custom table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.prose-custom th {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    /* text-xs */
    color: #475569;
}

.prose-custom td {
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    /* text-xs */
}

.prose-custom p {
    margin-bottom: 0.875rem;
    line-height: 1.6;
}

.prose-custom ul,
.prose-custom ol {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
    list-style-type: disc;
}

.prose-custom ol {
    list-style-type: decimal;
}

.prose-custom li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.prose-custom h3 {
    font-size: 1rem;
    /* text-base */
    margin-bottom: 1rem;
    color: #1e293b;
    border-left: 3px solid #4f46e5;
    padding-left: 0.75rem;
}

.prose-custom code {
    background-color: #eef2ff;
    color: #4338ca;
    padding: 0.2em 0.4em;
    font-size: 0.75rem;
    /* text-xs */
    border-radius: 3px;
}

.prose-custom blockquote {
    border-left-color: #4f46e5;
    background-color: #f1f5f9;
    padding: 0.5rem 1rem;
}

.prose-custom strong {
    color: #312e81;
}

.prose-custom a {
    color: #4f46e5;
    text-decoration: none;
}

.prose-custom a:hover {
    text-decoration: underline;
}

/* Deep Chat Customization */
#chat-container {
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
}

#chat-element {
    width: 100% !important;
    max-width: none !important;
    height: 600px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0 !important;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1) !important;
    overflow: hidden;
    background-color: white !important;
}

/* 스크롤바 숨기기 */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 초소형 텍스트 유틸리티 (최소 text-xs로 상향 조정) */
.text-xs-xxs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-xxs {
    font-size: 0.625rem;
    line-height: 0.875rem;
}

.text-xxxs {
    font-size: 0.75rem;
    line-height: 1rem;
}

/* 슬라이드 패널 스타일 */
#analysis-side-panel {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 60;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.side-panel-open {
    transform: translateX(0) !important;
}

/* 선택된 경기 카드 하이라이트 */
.panel.selected-match {
    border: 2px solid #4f46e5 !important;
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.15) !important;
    background-color: #f8fafc !important;
}

/* Push 레이아웃: 패널 오픈 시 메인 영역 여백 확보 */
@media (min-width: 1024px) {
    #main-container {
        transition: margin-right 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        width: auto;
    }

    body.side-panel-active #main-container {
        margin-right: 450px;
    }

    /* 모달들이 사이드 패널을 가리지 않고 가용 영역 중앙에 오도록 조정 */
    body.side-panel-active .fixed.inset-0.z-50 {
        right: 450px;
        transition: right 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* 모달 애니메이션 기본 설정 */
    .fixed.inset-0.z-50 {
        transition: right 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

.side-predict-btn.active {
    background-color: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: white !important;
}

.side-predict-btn.active * {
    color: white !important;
}

/* 아코디언(열기/접기) 분석글 스타일 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.master-pinned-card {
    border: 2px solid #4f46e5 !important;
    background-color: #ffffff !important;
    cursor: pointer;
}

.master-pinned-card:hover {
    background-color: #f8fafc !important;
}

@keyframes slow-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.toto-floating-btn {
    animation: slow-float 3s ease-in-out infinite;
}

/* 토토 마킹 슬롯 패널 스타일 */
#toto-slot-side-panel {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 60;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    background-color: white;
    width: 450px;
}

.toto-slot-row {
    border-bottom: 1px solid #f8fafc;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.slot-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    /* text-xxs */
    color: #334155;
    transition: all 0.2s;
    background-color: #fff;
}

.slot-btn:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.slot-btn.active-win {
    background-color: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.slot-btn.active-draw {
    background-color: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.slot-btn.active-lose {
    background-color: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

/* 결과 강조 (노랑색 아웃라인) */
.slot-btn.result-highlight {
    outline: 2px solid #fbbf24 !important;
    outline-offset: 1px;
    z-index: 10;
}

/* Make deep-chat occupy full screen */
deep-chat {
    width: 100% !important;
    height: calc(100vh - 280px) !important;
}

/* Gemini-style Chat Custom UI */
.gemini-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.gemini-bubble {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.5;
    position: relative;
    animation: bubble-in 0.3s ease-out;
}

@keyframes bubble-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gemini-bubble-user {
    align-self: flex-end;
    background: #4f46e5;
    color: white;
    border-bottom-right-radius: 0.25rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.gemini-bubble-ai {
    align-self: flex-start;
    background: #f8fafc;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 0.25rem;
}

.gemini-input-area {
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.gemini-input {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
}

.gemini-input:focus {
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.gemini-send-btn {
    width: 2.75rem;
    height: 2.75rem;
    background: #4f46e5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.gemini-send-btn:hover {
    background: #4338ca;
    transform: scale(1.05);
}

.gemini-send-btn:disabled {
    background: #e2e8f0;
    cursor: not-allowed;
}

.gemini-thinking {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem 0.25rem;
}

.gemini-dot {
    width: 0.375rem;
    height: 0.375rem;
    background: #94a3b8;
    border-radius: 50%;
    animation: thinking-dot 1.4s infinite ease-in-out both;
}

.gemini-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.gemini-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes thinking-dot {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Scroll to Top Button */
#scroll-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Chat UI Styles */
.chat-item {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    margin-bottom: 0.8rem;
}

.chat-info {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.125rem;
    color: #64748b;
    /* slate-500 */
}

.chat-bubble {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    line-height: 1.4;
    word-break: break-all;
}

.chat-left {
    align-self: flex-start;
}

.chat-left .chat-bubble {
    background-color: transparent;
    border: 1px solid #e2e8f0;
    /* slate-200 */
    color: #1e293b;
    /* slate-900 */
    border-top-left-radius: 0;
}

.chat-right {
    align-self: flex-end;
}

.chat-right .chat-info {
    flex-direction: row-reverse;
    text-align: right;
}

.chat-right .chat-bubble {
    background-color: transparent;
    border: 1px solid #e2e8f0;
    /* slate-200 */
    color: #1e293b;
    /* slate-900 */
    border-top-right-radius: 0;
}