/* ===================== 기본 구조 ===================== */
body {
    padding-top: 56px;
    padding-bottom: 70px;
    font-family: 'pretendard';
    font-size: 12px;
}

a {
    text-decoration: none;
    color: #000;
}

ul {
    display: block;
    padding-left: 0;
    margin: 0;
}

li {
    margin-bottom: 0.25rem;
}

[x-cloak] {
    display: none !important;
}

/* ===================== 네비게이션 ===================== */
/* 활성화된 하단 메뉴 스타일 */
.navbar .container a.active {
    color: #fff !important;
    background-color: #6D7345 !important;
    border-color: #6D7345 !important;
    padding: 5px 10px;
    border-radius: 7px;
}

/* 기본 글자색 유지 */
.navbar .container a {
    color: #212529 !important; /* 기본 어두운 색상 */
    text-decoration: none;
}

/* 기본 탭 링크 스타일 */
.nav-link {
    color: gray !important;
    border-bottom-color: transparent !important; /* 활성 탭이 올라와야 하므로 하단 테두리는 투명하게 */
}

/* 활성 탭 스타일 */
.nav-link.active {
    color: #fff !important;
    background-color: #6D7345 !important;
    border-color: #6D7345 !important; /* 활성 탭은 테두리 색상을 배경색과 동일하게 */
}

/* 탭 컨테이너의 하단 선 스타일 */
.nav-tabs {
    border-bottom: 1px solid #dee2e6 !important; /* 전체 탭의 하단 선 */
}

.list-group-item.active {
    background-color: #ffe066;
}

.nav-date-btn {
    width: 14.2%;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.nav-date-btn .day-label {
    font-size: 0.8rem;
    color: #6c757d;
}

.nav-date-btn .date-label {
    font-size: 1rem;
}

.nav-date-btn.active {
    border-bottom: 2px solid #6D7345;
}

.nav-date-btn.active .day-label,
.nav-date-btn.active .date-label {
    color: #6D7345;
    font-weight: bold;
}

/* ===================== 게시글/본문 ===================== */
.post-title {
    margin: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
}

.post-body img {
    display: block;
    height: auto;
    max-width: 100%;
    width: 100% !important;
}

.post-body iframe {
    max-width: 100%;
    width: 100% !important;
    height: 400px;
}

.note-editable iframe {
    max-width: 100%;
    width: 100% !important;
    height: 400px;
}

/* ===================== Lazy Load 이미지 ===================== */
.lazy-img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-img.loaded {
    opacity: 1;
}

/* ===================== 캘린더 ===================== */
#calendar, .fc {
    width: 100%;
    max-width: 100%;
}

.fc-daygrid-body {
    min-height: auto !important;
}

.fc .fc-toolbar-title {
    font-size: 1rem;
}

.fc .fc-button {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.fc-daygrid-day-top,
.fc-daygrid-day-number,
.fc-col-header-cell-cushion {
    color: #000 !important;
    text-decoration: none !important;
    cursor: default !important;
}

/* ===================== 경기 카드 ===================== */
.match-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

.match-info {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.match-result {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    text-align: center;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.teamA, .teamB {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.teamA-content, .teamB-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.teamA-content {
    flex-direction: row;
}

.teamB-content {
    flex-direction: row-reverse;
}

.teamA small, .teamB small {
    margin-top: 4px;
    display: block;
}

.score {
    font-weight: bold;
    font-size: 1.2em;
    text-align: center;
    white-space: nowrap;
}

.match-result span {
    font-weight: bold;
}

/* ===================== 예측 바 ===================== */
.prediction-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 0.5rem;
    position: relative;
}

.left-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(41, 55, 87, 0.15), rgba(41, 55, 87, 0.85));
    transition: width 0.3s;
    float: left;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.right-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(164, 29, 26, 0.85), rgba(164, 29, 26, 0.15));
    transition: width 0.3s;
    float: right;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.center-fill {
    width: 20%;
    height: 100%;
    margin: 0 auto;
    background: linear-gradient(90deg, rgba(86, 141, 75, 0.3), rgba(86, 141, 75, 0.7));
    border-radius: 4px;
}

/* ===================== 팀 선택 색상 ===================== */
.team-selected {
    font-weight: bold;
}

.team-selected.teamA {
    color: #293757;
}

.team-selected.teamB {
    color: #A41D1A;
}

/* ===================== FAB 버튼 ===================== */
.fab-container {
    position: fixed;
    bottom: 77px;
    right: 7px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    z-index: 1000;
    background-color: rgba(30, 30, 30, 0.1); /* 투명한 어두운 배경 */
    padding: 15px 20px; /* 버튼 주변 여백 */
    border-radius: 40px; /* 타원형 모양 */
    backdrop-filter: blur(5px); /* 배경 흐림 효과 (선택 사항, 모던 브라우저 지원) */
}

.fab-button {
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); /* 그림자를 더 크고 짙게 */
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.fab-button:hover {
    transform: translateY(-2px);
}

.fab-button-content {
    background-color: #58c514; /* 기본 상태: 약간 어두운 라임 그린 */
}

.fab-button-content:hover,
.fab-button-content-hover {
    background-color: #64DD17; /* 호버 시: 더 밝은 라임 그린 */
}

.fab-button-board {
    background-color: #e68900; /* 기본 상태: 약간 어두운 오렌지색 */
}

.fab-button-board:hover,
.fab-button-board-hover {
    background-color: #FF9800; /* 호버 시: 더 밝은 오렌지색 */
}

/* ===================== 별점 ===================== */
.starability-result.comment {
    transform: scale(0.5);
    transform-origin: left top;
    filter: hue-rotate(45deg) saturate(1.5);
    margin: 0;
}

/* ===================== SNS 아이콘 ===================== */
.spi_card .spi_area a:before {
    display: inline-block !important;
    margin: 0 auto 7px !important;
    content: "" !important;
    width: 40px;
    height: 40px;
}

.spi_card .spi_area a.link_kakaotalk:before {
    background: url("/image/ico_various.png") no-repeat -126px -126px / 282px 265px;
}

.spi_card .spi_area a.link_facebook:before {
    background: url("/image/ico_various.png") no-repeat -42px -84px / 282px 265px;
}

.spi_card .spi_area a.link_x:before {
    background: url("/image/ico_various.png") no-repeat -210px -168px / 282px 265px;
}

.spi_card .spi_area a.link_line:before {
    background: url("/image/ico_various.png") no-repeat -168px -126px / 282px 265px;
}

/* ===================== 편향 텍스트/배경 ===================== */
.text-center-bias {
    color: #568D4B !important;
    text-align: center;
}

.text-right-bias,
.text-right-bias:active,
.text-right-bias:focus {
    color: #A41D1A !important;
    text-align: center;
}

.text-left-bias,
.text-left-bias:active,
.text-left-bias:focus {
    color: #293757 !important;
    text-align: center;
}

.text-up {
    color: #A41D1A !important;
    text-align: center;
}

.text-down {
    color: #293757 !important;
    text-align: center;
}

.bg-center-bias {
    background-color: #568D4B;
}

.bg-right-bias {
    background-color: #A41D1A;
}

.bg-left-bias {
    background-color: #293757;
}

/* ===================== 뱃지 ===================== */
.badge-rounded {
    padding: 0.35em 0.65em;
    color: #000;
}

.badge-rounded-normal-bias {
    background: transparent !important;
    color: #8c8c8c;
}

.badge-rounded-center-bias {
    background: transparent !important;
    color: #000;
    padding: 0.35em 0.2em;
}

.badge-rounded-right-bias {
    background: transparent !important;
    color: #A41D1A;
    padding: 0.35em 0.2em;
}

.badge-rounded-left-bias {
    background: transparent !important;
    color: #293757;
    padding: 0.35em 0.2em;
}

/* ===================== 버튼 ===================== */
.mb-2.text-center {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-round {
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.85rem;
    cursor: pointer;
    background-color: #6D7345;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-round.active {
    background-color: #818852;
}

.btn-round:not(.active):hover {
    background-color: #d1d1d1;
}

.btn-round:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-round-outline {
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: #495057;
    border: 1px solid #adb5bd;
    transition: all 0.2s ease;
}

.btn-round-outline.active {
    background-color: #6D7345;
    color: #fff;
    border-color: #6D7345;
}

.btn-round-outline:not(.active):hover {
    background-color: #e9ecef;
    color: #212529;
    border-color: #6c757d;
}

.btn-round-outline.active:hover {
    background-color: #6D7345;
    border-color: #6D7345;
}

/* ===================== 페이지네이션 ===================== */
.jdl-pagination {
    display: flex !important;
    justify-content: center !important;
    padding-left: 0;
    list-style: none;
    margin-bottom: 0;
}

.jdl-page-item {
    margin: 0;
    border: none;
}

.jdl-page-link {
    background-color: transparent;
    border: none;
    color: #495057;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    margin: 0 0.15rem;
    cursor: pointer;
    line-height: 1.5;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: none;
}

.jdl-page-item.active .jdl-page-link {
    background-color: #6D7345;
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    transition: none !important;
    display: flex;
    justify-content: center;
    align-items: center;
}

.jdl-page-item:not(.active) .jdl-page-link:hover {
    background-color: #f8f9fa;
    color: #000;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.jdl-page-item.disabled .jdl-page-link {
    color: #adb5bd;
    background-color: transparent;
    cursor: not-allowed;
    pointer-events: none;
}

.jdl-page-item:first-child .jdl-page-link,
.jdl-page-item:last-child .jdl-page-link {
    border-radius: 0.25rem;
    width: auto;
    height: auto;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    transition: none;
}

.jdl-page-link:focus,
.jdl-page-link:active {
    transition: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ===================== 열린 공간 ===================== */
.open-group-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    color: #333;
}

.open-group-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 150px;
    object-fit: cover;
}

.no-image-placeholder {
    height: 150px;
    background-color: #f0f8ff;
    border-bottom: 1px solid #e0e0e0;
}

.group-name-on-bg {
    font-size: 1.2rem;
    font-weight: bold;
    color: #6c757d;
}

/* ===================== 기타 유틸 ===================== */
.economy-chart {
    padding: 0;
    margin: 0 auto;
}

.animate-scroll {
    animation: scroll 12s linear infinite;
}

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

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

@keyframes scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* ===================== 반응형 ===================== */
@media (min-width: 768px) {
    body {
        padding-bottom: 0 !important;
    }

    #calendar {
        font-size: 0.8rem;
    }

    .fab-container {
        bottom: 20px;
    }
}
