/**
 * Frontend Type2 - Common CSS
 * 공통 컴포넌트 스타일 (header, footer, modal 등)
 */

/* ================= Layout Override ================= */

/* main-content가 사이드바 사이 전체 너비를 사용하도록 */
.main-content {
    margin-right: 0 !important;
}

/* ================= Header Components ================= */

/* 안읽은 쪽지 배지 */
.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 아이콘 버튼 스타일 */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s;
    background: var(--bg-secondary);
    position: relative;
}

.icon-btn:hover {
    color: var(--gold-primary);
    border-color: var(--gold-primary);
    background: var(--bg-card);
}

/* 쪽지 알림 팝업 */
.message-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-popup-content {
    background: var(--bg-card);
    border: 2px solid var(--gold-primary);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    max-width: 350px;
    width: 90%;
    position: relative;
    animation: popup-appear 0.3s ease-out;
    box-shadow: var(--shadow-card-hover);
}

@keyframes popup-appear {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.message-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

.message-popup-close:hover {
    color: var(--gold-primary);
}

.message-popup-icon {
    margin-bottom: 15px;
}

.message-popup h4 {
    color: var(--gold-primary);
    font-size: 18px;
    margin-bottom: 10px;
}

.message-popup p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    word-break: break-word;
}

.message-popup-btn {
    display: inline-block;
    background: var(--gold-gradient);
    color: #fff;
    padding: 10px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

.message-popup-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

/* 언어 선택 박스 */
.language-selector {
    display: flex;
    align-items: center;
    margin: 0 1rem;
}

.language-selector .lang-select,
.lang-select {
    width: 150px;
    height: 40px;
    padding: 0.8rem 1.2rem;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1.4rem;
    padding-right: 3rem;
    line-height: 1.4;
}

.language-selector .lang-select:hover,
.lang-select:hover {
    background-color: #333;
    border-color: #555;
}

.language-selector .lang-select:focus,
.lang-select:focus {
    background-color: #2a2a2a;
    border-color: var(--gold-primary, #d4af37);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.language-selector .lang-select option,
.lang-select option {
    background-color: #2a2a2a;
    color: #fff;
    padding: 1rem;
    font-size: 0.7rem;
}

/* 모바일 언어 선택 */
.language-selector.mobile {
    margin: 0 0.5rem;
}

.language-selector.mobile .lang-select {
    width: 80px;
    height: 36px;
    padding: 0.6rem 0.8rem;
    padding-right: 2.2rem;
    font-size: 1.2rem;
    background-size: 1rem;
}

/* 구글 번역 배너 숨기기 */
.goog-te-banner-frame {
    display: none !important;
}

.skiptranslate {
    display: none !important;
}

/* 모바일 보유머니/포인트 바 */
.mobile-balance-bar {
    display: none;
    background: linear-gradient(135deg, #d4af37 0%, #b8942d 100%);
    border-bottom: 2px solid #d4af37;
    padding: 0.8rem 1rem;
    gap: 0.8rem;
}

.mobile-balance-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
}

.mobile-balance-btn:hover,
.mobile-balance-btn:active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
}

.mobile-balance-btn i {
    color: var(--gold-primary);
    font-size: 1rem;
}

.mobile-balance-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.mobile-balance-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold-primary);
}

.mobile-balance-btn.point-btn .mobile-balance-value {
    color: #4ec9b0;
}

/* ================= Mobile Only Quick Links (사이드바 정보수정/로그아웃) ================= */
.mobile-only-quicklink {
    display: none !important;
}

@media (max-width: 992px) {
    .mobile-only-quicklink {
        display: flex !important;
    }

    /* 태블릿/모바일에서 헤더의 정보수정/로그아웃 버튼 숨기기 */
    .header-actions .btn-login,
    .header-actions .btn-signup {
        display: none !important;
    }

    /* 태블릿/모바일에서 헤더의 잔액 정보 숨기기 */
    .header-actions .balance-info {
        display: none !important;
    }

    /* 태블릿/모바일에서 쪽지 아이콘 숨기기 */
    .header-actions .icon-btn {
        display: none !important;
    }

    /* 태블릿/모바일에서 언어 선택 숨기기 */
    .header-actions .language-selector {
        display: none !important;
    }
}

/* ================= Header Responsive ================= */
@media (max-width: 1200px) {
    .mobile-balance-bar {
        display: flex;
    }
}

@media (max-width: 768px) {
    .header-actions .icon-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .language-selector {
        margin: 0 0.5rem;
    }

    .language-selector .lang-select,
    .lang-select {
        width: 100px;
        height: 36px;
        padding: 0.5rem 0.8rem;
        padding-right: 2.2rem;
        font-size: 1.2rem;
        background-size: 1rem;
    }

    /* 모바일 밸런스 바: 헤더(70px) 바로 아래에 표시 */
    .mobile-balance-bar {
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 999 !important;
    }

}

/* ================= Modal Common Styles ================= */

/* 모달 에러/성공 메시지 */
.modal-error-message {
    color: #dc3545;
    font-size: 0.75rem;
    margin-top: 0.35rem;
    display: none;
}

.modal-error-message.show {
    display: block;
}

.modal-form-input.error,
.modal-form-select.error {
    border-color: #dc3545 !important;
}

.modal-alert {
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    font-size: 1.4rem;
}

.modal-alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border: 0.1rem solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
}

.modal-alert-success {
    background: rgba(40, 167, 69, 0.15);
    border: 0.1rem solid rgba(40, 167, 69, 0.3);
    color: #4ecca3;
}

.modal-login-button:disabled,
.modal-signup-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-check-btn.checking {
    opacity: 0.6;
    pointer-events: none;
}

.modal-check-btn.success {
    background: rgba(40, 167, 69, 0.25);
    border-color: #28a745;
}

.modal-check-btn.error {
    background: rgba(220, 53, 69, 0.25);
    border-color: #dc3545;
}

/* ================= Mypage Modal Styles ================= */

.mypage-modal-container {
    background: #1a1a1a;
    border-radius: 2rem;
    padding: 3rem;
    max-width: 60rem;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
}

.mypage-modal-header {
    text-align: center;
    margin-bottom: 3rem;
}

.mypage-modal-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.mypage-section {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 0.1rem solid rgba(255, 255, 255, 0.1);
}

.mypage-section:last-of-type {
    border-bottom: none;
    margin-bottom: 2rem;
}

.mypage-section h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #999;
    margin-bottom: 2rem;
}

.modal-info-notice {
    font-size: 1.3rem;
    color: #999;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.8rem;
    text-align: center;
}

.mypage-modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
}

.modal-mypage-button {
    flex: 1;
    background: #8f6855;
    color: #fff;
    border: none;
    padding: 1.5rem 3rem;
    font-size: 1.6rem;
    font-weight: 600;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-mypage-button:hover {
    transform: translateY(-0.2rem);
    box-shadow: 0 0.5rem 2rem rgba(143, 104, 85, 0.4);
}

.modal-mypage-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ================= Session Timeout Modal Styles ================= */

#session-timeout-modal .popup__inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================= 로그인/회원가입/정보수정 모달 중앙 정렬 ================= */
#login-modal .popup__inner,
#signup-modal .popup__inner,
#mypage-modal .popup__inner {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    transform: none !important;
    padding: 20px;
}

/* 모달 컨테이너 중앙 정렬 */
#login-modal .login-modal-container,
#signup-modal .signup-modal-container,
#mypage-modal .mypage-modal-container {
    margin: 0 auto !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
}

/* 767px 미디어 쿼리 - align-items: flex-end 오버라이드 */
@media all and (max-width: 767px) {
    #login-modal .popup__inner,
    #signup-modal .popup__inner,
    #mypage-modal .popup__inner {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 15px !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        transform: none !important;
    }

    #login-modal .login-modal-container,
    #signup-modal .signup-modal-container {
        width: calc(100% - 30px) !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }
}

.session-timeout-container {
    background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,165,0,0.3);
}

.session-timeout-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-warning 1.5s infinite;
}

.session-timeout-icon i {
    font-size: 36px;
    color: #fff;
}

@keyframes pulse-warning {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,107,53,0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px 10px rgba(255,107,53,0); }
}

.session-timeout-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
}

.session-timeout-message {
    font-size: 18px;
    color: #ff6b35;
    margin-bottom: 10px;
    font-weight: 600;
}

#session-countdown {
    font-size: 28px;
    font-weight: 700;
    color: #ff3b30;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.session-timeout-desc {
    font-size: 14px;
    color: #999;
    margin-bottom: 25px;
}

.session-timeout-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-extend-session {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-extend-session:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(76,175,80,0.4);
}

.btn-extend-session:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-logout-now {
    background: rgba(255,255,255,0.1);
    color: #999;
    border: 1px solid #444;
    padding: 15px 25px;
    font-size: 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-logout-now:hover {
    background: rgba(255,59,48,0.2);
    border-color: #ff3b30;
    color: #ff3b30;
}

/* ================= Popup System Styles ================= */

#popup-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 15px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    padding: 10px;
}

.site-popup {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 1000000 !important;
    max-width: calc(100vw - 40px);
}

.site-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #fff;
}

.site-popup-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.site-popup-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.site-popup-content {
    overflow: hidden;
}

.site-popup-content img {
    display: block;
    width: 100%;
    height: auto;
}

.site-popup-text {
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.site-popup-footer {
    padding: 10px 15px;
    background: #f5f5f5;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-popup-today-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.site-popup-today-label input {
    margin: 0;
    cursor: pointer;
}

.site-popup-close-btn {
    background: #666;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.site-popup-close-btn:hover {
    background: #555;
}

@media (max-width: 768px) {
    .site-popup {
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: calc(100vw - 40px) !important;
        max-width: 400px !important;
    }
}

/* ========================================
   배팅슬립 스타일 (공통)
   ======================================== */

.bet-slip-container {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    margin: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* 헤더 */
.bet-slip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.bet-slip-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #d4a017;
}

.bet-slip-title i {
    font-size: 18px;
    color: #d4a017;
}

.bet-slip-reset-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.bet-slip-reset-btn:hover {
    color: #333;
}

.bet-slip-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
    margin-left: 5px;
}

.bet-slip-close-btn:hover {
    color: #ff4444;
}

/* 배팅 아이템 영역 */
.bet-slip-content {
    min-height: 100px;
}

.bet-slip-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    border: 2px dashed #c9c49a;
    margin: 15px;
    border-radius: 8px;
    background: #fafaf5;
}

.bet-slip-empty-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.bet-slip-empty-icon i {
    font-size: 40px;
    color: #ccc;
}

.bet-slip-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.bet-slip-empty-desc {
    font-size: 13px;
    color: #888;
    margin: 0;
}

/* 배팅 아이템 (선택된 경기) */
.bet-slip-item {
    margin: 10px 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #d4a017;
    border-radius: 10px;
    position: relative;
}

.bet-slip-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.bet-slip-item-league {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.bet-slip-item-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s;
}

.bet-slip-item-remove:hover {
    color: #ff6b6b;
}

.bet-slip-item-teams {
    margin-bottom: 8px;
}

.bet-slip-item-home,
.bet-slip-item-away {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bet-slip-item-teams .team-label {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
}

.bet-slip-item-teams .team-label.home {
    background: #3478f6;
    color: #fff;
}

.bet-slip-item-teams .team-label.away {
    background: #ff6b6b;
    color: #fff;
}

.bet-slip-item-selection {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bet-slip-item-pick {
    font-size: 14px;
    font-weight: 600;
    color: #d4a017;
}

.bet-slip-item-odds {
    font-size: 16px;
    font-weight: 700;
    color: #ff8c00;
}

.bet-slip-item-odds.suspended {
    color: #999;
    font-size: 14px;
}

.bet-slip-item-odds.odds-up {
    color: #ff3b30;
}

.bet-slip-item-odds.odds-down {
    color: #007aff;
}

/* 상태 메시지 */
.bet-slip-item-status {
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.bet-slip-item-status.deleted,
.bet-slip-item-status.stopped {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
}

.bet-slip-item-status.changed {
    background: rgba(255, 149, 0, 0.15);
    color: #ff9500;
}

.bet-slip-item-status .odds-up {
    color: #ff3b30;
}

.bet-slip-item-status .odds-down {
    color: #007aff;
}

/* 중지된 아이템 */
.bet-slip-item.slip-item-stopped {
    border-color: #ff3b30;
    opacity: 0.8;
}

/* 배당 변경 아이템 */
.bet-slip-item.slip-item-changed {
    border-color: #ff9500;
}

/* 배팅금액 섹션 */
.bet-slip-amount-section {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #fff;
}

/* 한 줄 레이아웃: 보유 | 새로고침 | 입력박스 */
.bet-slip-amount-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.bet-slip-balance-info {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.bet-slip-balance-info .balance-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.bet-slip-balance-info .balance-value {
    font-size: 14px;
    font-weight: 700;
    color: #2d8f3c;
}

.bet-slip-refresh-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.bet-slip-refresh-btn:hover {
    border-color: #d4a017;
    color: #d4a017;
}

.bet-slip-refresh-btn i {
    font-size: 12px;
}

.bet-slip-refresh-btn.refreshing i {
    animation: spin 1s linear infinite;
}

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

.bet-slip-amount-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.bet-slip-amount-label {
    font-size: 14px;
    font-weight: 600;
    color: #9a8c5c;
}

.bet-slip-amount-header i {
    color: #888;
    font-size: 14px;
}

.bet-slip-amount-row .bet-slip-amount-input-wrapper {
    flex: 1;
    margin-bottom: 0;
}

.bet-slip-amount-input-wrapper {
    margin-bottom: 12px;
}

.bet-slip-amount-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: right;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.bet-slip-amount-input:focus {
    outline: none;
    border-color: #d4a017;
}

.bet-slip-quick-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.bet-slip-quick-btns button {
    flex: 1;
    min-width: 45px;
    padding: 8px 4px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.bet-slip-quick-btns button:hover {
    border-color: #d4a017;
    color: #d4a017;
}

.bet-slip-quick-btns button.max-btn {
    background: #d4a017;
    border-color: #d4a017;
    color: #fff;
}

.bet-slip-quick-btns button.max-btn:hover {
    background: #c49516;
    border-color: #c49516;
}

/* 배팅 정보 */
.bet-slip-info {
    padding: 15px 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.bet-slip-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.bet-slip-info-row .info-label {
    font-size: 13px;
    color: #666;
}

.bet-slip-info-row .info-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.bet-slip-info-row .info-value.highlight-green {
    color: #2d8f3c;
}

.bet-slip-info-row .info-value.highlight-yellow {
    color: #9a8c5c;
}

/* 배팅 버튼 */
.bet-slip-actions {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: #fff;
}

.bet-slip-submit-btn {
    flex: 1;
    padding: 14px 20px;
    background: #e86c5d;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.bet-slip-submit-btn:hover {
    background: #d85c4d;
}

.bet-slip-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.bet-slip-cancel-btn {
    flex: 1;
    padding: 14px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.bet-slip-cancel-btn:hover {
    border-color: #999;
    color: #333;
}

/* 배팅슬립 다크모드 */
[data-theme="dark"] .bet-slip-container {
    background: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .bet-slip-header {
    border-bottom-color: #333;
}

[data-theme="dark"] .bet-slip-title {
    color: #fbbf24;
}

[data-theme="dark"] .bet-slip-title i {
    color: #fbbf24;
}

[data-theme="dark"] .bet-slip-reset-btn {
    color: #888;
}

[data-theme="dark"] .bet-slip-reset-btn:hover {
    color: #fff;
}

[data-theme="dark"] .bet-slip-empty {
    border-color: #333;
    background: #222;
}

[data-theme="dark"] .bet-slip-empty-icon i {
    color: #555;
}

[data-theme="dark"] .bet-slip-empty-title {
    color: #eee;
}

[data-theme="dark"] .bet-slip-empty-desc {
    color: #888;
}

[data-theme="dark"] .bet-slip-item {
    background: linear-gradient(135deg, #4a3728 0%, #3d2e22 100%);
    border-color: #d4a017;
}

[data-theme="dark"] .bet-slip-item-league {
    color: #bbb;
}

[data-theme="dark"] .bet-slip-item-home,
[data-theme="dark"] .bet-slip-item-away {
    color: #ddd;
}

[data-theme="dark"] .bet-slip-item-pick {
    color: #d4a017;
}

[data-theme="dark"] .bet-slip-item-odds {
    color: #ff8c00;
}

[data-theme="dark"] .bet-slip-amount-section {
    background: #1a1a1a;
    border-top-color: #333;
}

[data-theme="dark"] .bet-slip-amount-label {
    color: #b8a87c;
}

[data-theme="dark"] .bet-slip-amount-input {
    background: #222;
    border-color: #444;
    color: #eee;
}

[data-theme="dark"] .bet-slip-amount-input:focus {
    border-color: #fbbf24;
}

[data-theme="dark"] .bet-slip-quick-btns button {
    background: #222;
    border-color: #444;
    color: #ddd;
}

[data-theme="dark"] .bet-slip-quick-btns button:hover {
    border-color: #fbbf24;
    color: #fbbf24;
}

[data-theme="dark"] .bet-slip-quick-btns button.max-btn {
    background: #fbbf24;
    border-color: #fbbf24;
    color: #000;
}

[data-theme="dark"] .bet-slip-info {
    background: #151515;
    border-top-color: #333;
}

[data-theme="dark"] .bet-slip-info-row .info-label {
    color: #888;
}

[data-theme="dark"] .bet-slip-info-row .info-value {
    color: #eee;
}

[data-theme="dark"] .bet-slip-info-row .info-value.highlight-green {
    color: #4ade80;
}

[data-theme="dark"] .bet-slip-info-row .info-value.highlight-yellow {
    color: #b8a87c;
}

[data-theme="dark"] .bet-slip-actions {
    background: #1a1a1a;
}

[data-theme="dark"] .bet-slip-submit-btn {
    background: #e86c5d;
}

[data-theme="dark"] .bet-slip-submit-btn:hover {
    background: #d85c4d;
}

[data-theme="dark"] .bet-slip-cancel-btn {
    background: #222;
    border-color: #444;
    color: #aaa;
}

[data-theme="dark"] .bet-slip-cancel-btn:hover {
    border-color: #666;
    color: #fff;
}

/* 배팅슬립 반응형 */
@media (max-width: 992px) {
    .bet-slip-container {
        margin: 5px;
    }

    .bet-slip-header {
        padding: 12px 15px;
    }

    .bet-slip-amount-section {
        padding: 12px 15px;
    }

    .bet-slip-info {
        padding: 12px 15px;
    }

    .bet-slip-actions {
        padding: 12px 15px;
    }
}

/* ================= 모바일 배팅슬립 스크롤 수정 ================= */
@media (max-width: 768px) {
    /* 모바일에서 sidebar-right 내부 구조 개선 */
    .sidebar-right .main-right {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .sidebar-right .main-right > div {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    /* 배팅슬립 컨테이너 - flexbox로 높이 제어 */
    .sidebar-right .bet-slip-container {
        display: flex;
        flex-direction: column;
        height: calc(100vh - 20px);
        max-height: calc(100vh - 20px);
        margin: 10px;
        overflow: hidden;
    }

    /* 배팅슬립 헤더 - 고정 높이 */
    .sidebar-right .bet-slip-header {
        flex-shrink: 0;
    }

    /* 배팅슬립 내용 영역 - 스크롤 가능하게 */
    .sidebar-right .bet-slip-content {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
    }

    /* 배팅금액 섹션 - 고정 */
    .sidebar-right .bet-slip-amount-section {
        flex-shrink: 0;
    }

    /* 배팅 정보 - 고정 */
    .sidebar-right .bet-slip-info {
        flex-shrink: 0;
    }

    /* 배팅 버튼 - 항상 하단에 고정 */
    .sidebar-right .bet-slip-actions {
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        background: #fff;
        border-top: 1px solid #eee;
        padding: 12px 15px;
        z-index: 10;
    }

    /* 다크모드 배팅 버튼 배경 */
    [data-theme="dark"] .sidebar-right .bet-slip-actions {
        background: #1a1a1a;
        border-top-color: #333;
    }
}

/* ================= Page Section Header ================= */
.page-section-header {
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.page-section-header.extra-top {
    margin-top: 4rem;
}

.page-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: none;
    padding-left: 0;
}

.page-section-title .section-icon {
    width: 32px;
    height: 32px;
}

.page-section-title h2 {
    margin: 0;
    font-size: 1.75rem;
}

.page-section-title .section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

/* ================= Auth Buttons Bar (비로그인 상태 - 모바일 전용) ================= */
.auth-buttons-bar {
    display: none; /* 기본: 숨김 (데스크톱) */
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--gold-primary) 0%, #b8942d 100%);
    border-bottom: 2px solid var(--gold-primary);
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
}

/* 모바일에서만 auth-buttons-bar 표시 */
@media (max-width: 768px) {
    .auth-buttons-bar {
        display: flex;
    }
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.auth-btn.auth-login {
    background: #fff;
    color: #333;
}

.auth-btn.auth-login:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.auth-btn.auth-signup {
    background: #333;
    color: #fff;
}

.auth-btn.auth-signup:hover {
    background: #222;
    transform: translateY(-2px);
}

/* ======================================
   모바일 플로팅 배팅 버튼
   ====================================== */
.floating-bet-btn {
    display: none;  /* PC에서 숨김 */
    position: fixed;
    right: 10px;
    top: 130px;
    background: linear-gradient(135deg, #d4af37, #b8942d);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    z-index: 9999;  /* 최상위 */
    flex-direction: row;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.floating-bet-btn:hover {
    background: linear-gradient(135deg, #e5c048, #c9a53e);
}

.floating-bet-btn i {
    font-size: 1rem;
}

.floating-bet-text {
    font-weight: bold;
    font-size: 0.75rem;
}

.floating-bet-count {
    background: #ff4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* 배팅 0개일 때 카운트 숨김 */
.floating-bet-count:empty,
.floating-bet-count[data-count="0"] {
    display: none;
}

/* 모바일에서만 표시 */
@media (max-width: 768px) {
    .floating-bet-btn {
        display: flex;
    }

    /* 배팅슬립 열렸을 때 숨김 */
    .floating-bet-btn.hidden {
        display: none !important;
    }
}

/* ================= MicroModal Styles ================= */
/* 공통 모달 스타일 - 인플레이, 스포츠 등 모든 페이지에서 사용 */

.modal {
  display: none;
}

.modal.is-open {
  display: block;
}

.modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal__container {
  background-color: #2d343a;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  overflow-y: auto;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal__header.header-hidden {
  display: none !important;
}

.modal__title {
  margin: 0;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.modal__close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  position: relative;
}

.modal__close:before,
.modal__close:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: #fff;
}

.modal__close:before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal__close:after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal__close:hover:before,
.modal__close:hover:after {
  background: #fc7604;
}

.modal__content {
  margin-bottom: 20px;
  line-height: 1.5;
  flex: 1;
  overflow-y: auto;
  max-height: calc(80vh - 180px);
}

.modal-message {
  color: #fff;
  font-size: 16px;
  margin: 0;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal__btn {
  padding: 10px 24px;
  background-color: #444;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal__btn:hover {
  background-color: #555;
}

.modal__btn-primary {
  background-color: #8f6855;
}

.modal__btn-primary:hover {
  background-color: #a77e68;
}

/* MicroModal 애니메이션 */
@keyframes mmfadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes mmfadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes mmslideIn {
  from { transform: translateY(15%); }
  to { transform: translateY(0); }
}

@keyframes mmslideOut {
  from { transform: translateY(0); }
  to { transform: translateY(-10%); }
}

.micromodal-slide {
  display: none;
}

.micromodal-slide.is-open {
  display: block;
}

.micromodal-slide[aria-hidden="false"] .modal__overlay {
  animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="false"] .modal__container {
  animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__overlay {
  animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__container {
  animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide .modal__container,
.micromodal-slide .modal__overlay {
  will-change: transform;
}
