* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* 헤더 */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid #18181b;
}

.header-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.logo-text p {
    font-size: 0.625rem;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-badge {
    padding: 0.5rem 1rem;
    background: #18181b;
    border-radius: 0.5rem;
    border: 1px solid #27272a;
    font-size: 0.875rem;
}

.info-badge strong {
    color: #10b981;
    font-weight: 700;
}

.info-badge.blue strong {
    color: #3b82f6;
}

.login-button {
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 0.5rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
}

.info-badge span {
    color: #52525b;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* 메인 컨테이너 */
.main-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 1.5rem;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

/* 배너 영역 */
.banner-container {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.banner-content {
    height: 120px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #71717a;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

.banner-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.banner-label {
    font-size: 0.625rem;
    color: #71717a;
    font-weight: 700;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* 검색바 */
.search-container {
    position: relative;
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.75rem;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: #3f3f46;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #52525b;
}

/* 테이블 */
.table-container {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.3rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid #27272a;
}

th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    user-select: none;
}

th:hover {
    color: #fff;
}

th.text-right {
    text-align: right;
}

tbody tr {
    border-bottom: 1px solid #27272a;
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: rgba(63, 63, 70, 0.4);
    transform: translateX(2px);
}

td {
    padding: 1rem;
    font-size: 0.875rem;
}

td.text-right {
    text-align: right;
}

.coin-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.coin-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.coin-name {
    font-weight: 700;
}

.premium-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.8125rem;
    transition: all 0.2s;
}

.premium-badge:hover {
    transform: scale(1.05);
}

.premium-positive {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.premium-negative {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.change-positive {
    color: #ef4444;
    font-weight: 700;
}

.change-negative {
    color: #3b82f6;
    font-weight: 700;
}

.long-short-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.progress-bar {
    width: 4rem;
    height: 0.375rem;
    background: #27272a;
    border-radius: 0.25rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    transition: width 0.3s;
}

.progress-fill.short {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

/* 사이드바 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s;
}

.sidebar-card:hover {
    border-color: #3f3f46;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-header {
    padding: 1rem;
    border-bottom: 1px solid #27272a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header h3 {
    font-size: 0.875rem;
    font-weight: 700;
}
.card-header .icon {
    font-size: 1.125rem;
}
.card-body {
    padding: 0.75rem;
}
.rank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    transition: background 0.15s;
}
.rank-item:hover {
    background: rgba(63, 63, 70, 0.3);
}
.rank-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.rank-number {
    width: 1rem;
    font-size: 0.75rem;
    color: #71717a;
}
.rank-coin {
    font-weight: 700;
    font-size: 0.875rem;
}
.rank-change {
    font-weight: 700;
    font-size: 0.875rem;
}
/* 채팅 */
.chat-messages {
    height: 24rem;
    overflow-y: auto;
    padding: 0.75rem;
}
.chat-message {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background 0.15s;
}
.chat-message:hover {
    background: rgba(63, 63, 70, 0.2);
}
.chat-avatar {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 9999px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}
.chat-content {
    flex: 1;
}
.chat-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.chat-user {
    font-weight: 700;
    font-size: 0.75rem;
}
.chat-time {
    font-size: 0.625rem;
    color: #71717a;
}
.chat-text {
    font-size: 0.8125rem;
    color: #d4d4d8;
}
.chat-input-container {
    padding: 0.75rem;
    border-top: 1px solid #27272a;
    display: flex;
    gap: 0.5rem;
}
.chat-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.8125rem;
    outline: none;
}
.chat-button {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 0.5rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}
.chat-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
}
/* 광고 영역 */
.ad-container {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}
.ad-label {
    font-size: 0.625rem;
    color: #71717a;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.ad-content {
    height: 12rem;
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #52525b;
    font-size: 0.75rem;
}
/* 알림 설정 */
.alert-container {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s;
}
.alert-container:hover {
    border-color: #3f3f46;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.alert-header {
    padding: 1rem;
    border-bottom: 1px solid #27272a;
    background: rgba(234, 179, 8, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-header .icon {
    font-size: 1.125rem;
}
.alert-header h3 {
    font-size: 0.875rem;
    font-weight: 700;
}
.alert-body {
    padding: 1rem;
}
.alert-description {
    font-size: 0.8125rem;
    color: #a1a1aa;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.form-group {
    margin-bottom: 1rem;
}
.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #d4d4d8;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-input {
    width: 100%;
    padding: 0.75rem;
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
}
.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.form-input::placeholder {
    color: #52525b;
}
.form-select {
    width: 100%;
    padding: 0.75rem;
    background: #09090b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
    cursor: pointer;
}
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.exchange-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}
.exchange-option {
    position: relative;
}
.exchange-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}
.exchange-option label {
    display: block;
    padding: 0.75rem;
    background: #09090b;
    border: 2px solid #27272a;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
}
.exchange-option input[type="checkbox"]:checked + label {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    color: #3b82f6;
}
.exchange-option label:hover {
    border-color: #3f3f46;
}
.submit-button {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #eab308, #f59e0b);
    border: none;
    border-radius: 0.5rem;
    color: #000;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.3);
}
.submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 25px rgba(234, 179, 8, 0.5);
}
/* 푸터 */
footer {
    margin-top: 3rem;
    padding: 3rem 1.5rem;
    border-top: 1px solid #27272a;
}
.footer-container {
    max-width: 1920px;
    margin: 0 auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-section h4 {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.footer-section p,
.footer-section a {
    font-size: 0.8125rem;
    color: #71717a;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}
.footer-section a:hover {
    color: #fff;
}
.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #27272a;
    text-align: center;
}
.footer-bottom p {
    font-size: 0.8125rem;
    color: #71717a;
    margin-bottom: 0.5rem;
}
.footer-bottom .disclaimer {
    font-size: 0.75rem;
    color: #52525b;
}
/* 반응형 */
@media (max-width: 1280px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .sidebar-card:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    /* 환율 정보는 숨김 */
    .info-badge,
    .header-info > div:not(.login-button):not(.user-button) {
        display: none;
    }

    /* 로그인 버튼은 표시 */
    .login-button,
    .user-button {
        display: flex !important;
    }

    .main-container {
        padding: 1rem;
    }

    .banner-content {
        height: 80px;
        font-size: 0.75rem;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.75rem;
    }

    th, td {
        padding: 0.5rem 0.25rem;
    }

    .coin-icon {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.625rem;
    }

    .coin-name {
        font-size: 0.875rem;
    }

    .premium-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .progress-bar {
        width: 3rem;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 800px;
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 1rem;
    }
    .logo-text p {
        font-size: 0.5rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    .search-input {
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        font-size: 0.8125rem;
    }

    .search-icon {
        left: 0.75rem;
        width: 16px;
        height: 16px;
    }

    th {
        font-size: 0.625rem;
    }

    td {
        font-size: 0.7rem;
        padding: 0.5rem 0.2rem;
    }

    .chat-messages {
        height: 18rem;
    }

    .rank-item {
        padding: 0.4rem;
    }

    .rank-coin {
        font-size: 0.8125rem;
    }

    .rank-change {
        font-size: 0.8125rem;
    }
}

/* 스크롤바 커스터마이징 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #18181b;
}
::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: block;
}

/* 애니메이션 추가 (선택사항) */
.logo-icon {
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(360deg);
}

/* 기존 CSS 마지막에 추가 */

/* 가격 상승 애니메이션 */
@keyframes priceUp {
    0% { background-color: rgba(239, 68, 68, 0.3); }
    100% { background-color: transparent; }
}

/* 가격 하락 애니메이션 */
@keyframes priceDown {
    0% { background-color: rgba(59, 130, 246, 0.3); }
    100% { background-color: transparent; }
}

/* 김프 변동 애니메이션 */
@keyframes premiumChange {
    0% { transform: scale(1.1); box-shadow: 0 0 20px currentColor; }
    100% { transform: scale(1); box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); }
}

/* 애니메이션 클래스 */
.price-up {
    animation: priceUp 1s ease-out;
}

.price-down {
    animation: priceDown 1s ease-out;
}

.premium-changed {
    animation: premiumChange 0.5s ease-out;
}

/* 롱숏 비율 N/A 스타일 */
.long-short-na {
    color: #52525b;
    font-size: 0.8125rem;
}

/* ========================================
   모달 스타일
   ======================================== */

/* 모달 오버레이 */
.modal {
    display: none !important;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-in-out;
}

.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 모달 컨텐츠 */
.modal-content {
    background: linear-gradient(to bottom, #18181b, #0a0a0a);
    border: 1px solid #27272a;
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 모달 헤더 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #27272a;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #a1a1aa;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #27272a;
    color: #ffffff;
}

/* 모달 바디 */
.modal-body {
    padding: 2rem;
}

/* 폼 그룹 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #e4e4e7;
    margin-bottom: 0.5rem;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder {
    color: #52525b;
}

/* 이메일/사용자명 중복확인 버튼이 있는 입력 */
.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button input {
    flex: 1;
}

.btn-check {
    padding: 0.75rem 1rem;
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-check:hover {
    background: #3f3f46;
    border-color: #52525b;
}

.btn-check:active {
    transform: scale(0.98);
}

/* 유효성 검사 메시지 */
.validation-message {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.375rem;
    min-height: 1rem;
}

.validation-message.success {
    color: #10b981;
}

.validation-message.error {
    color: #ef4444;
}

/* 도움말 텍스트 */
.help-text {
    display: block;
    font-size: 0.75rem;
    color: #71717a;
    margin-top: 0.375rem;
}

/* 폼 옵션 (로그인 상태 유지, 비밀번호 찾기) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* 체크박스 라벨 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #e4e4e7;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    accent-color: #3b82f6;
}

/* 링크 텍스트 */
.link-text {
    color: #3b82f6;
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.link-text:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* 주 버튼 (로그인, 회원가입) */
.btn-primary {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 8px -1px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #3f3f46;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 폼 푸터 */
.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #27272a;
    font-size: 0.875rem;
    color: #a1a1aa;
}

.form-footer .link-text {
    margin-left: 0.5rem;
}

/* ========================================
   토스트 알림
   ======================================== */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    min-width: 300px;
    max-width: 400px;
    padding: 1rem 1.25rem;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-out;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

/* ========================================
   반응형
   ======================================== */
@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 1.25rem 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .toast {
        right: 1rem;
        left: 1rem;
        max-width: calc(100% - 2rem);
    }

    .input-with-button {
        flex-direction: column;
    }

    .btn-check {
        width: 100%;
    }
}

/* 스크롤바 스타일 (모달 내부) */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* ========================================
   사용자 드롭다운 메뉴
   ======================================== */

/* 로그인 버튼 (로그인 전) */
.login-button {
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.login-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

/* 사용자 버튼 (로그인 후) */
.user-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.user-button:hover {
    background: #27272a;
    border-color: #3f3f46;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
}

.user-button-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-button-arrow {
    margin-left: auto;
    transition: transform 0.2s;
}

.user-button.active .user-button-arrow {
    transform: rotate(180deg);
}

/* 드롭다운 메뉴 */
.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 280px;
    background: linear-gradient(to bottom, #18181b, #0a0a0a);
    border: 1px solid #27272a;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease-out;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 드롭다운 헤더 */
.user-dropdown-header {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-email {
    font-size: 0.8125rem;
    color: #71717a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 0.125rem;
}

/* 구분선 */
.user-dropdown-divider {
    height: 1px;
    background: #27272a;
    margin: 0;
}

/* 드롭다운 바디 */
.user-dropdown-body {
    padding: 0.5rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.875rem;
    color: #e4e4e7;
    font-size: 0.9375rem;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #27272a;
    color: #ffffff;
}

.dropdown-item svg {
    flex-shrink: 0;
}

/* 드롭다운 푸터 */
.user-dropdown-footer {
    padding: 0.5rem;
}

.dropdown-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    color: #ef4444;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.dropdown-logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ========================================
   내 정보 모달
   ======================================== */

.modal-content-small {
    max-width: 400px;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #27272a;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #a1a1aa;
}

.info-value {
    font-size: 0.9375rem;
    color: #e4e4e7;
    text-align: right;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.info-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-secondary {
    flex: 1;
    padding: 0.75rem;
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #3f3f46;
    border-color: #52525b;
}

/* ========================================
   반응형
   ======================================== */

@media (max-width: 640px) {
    .user-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }

    .user-dropdown.show {
        transform: translateY(0);
    }

    .user-button-name {
        max-width: 80px;
    }
}

/* 드롭다운 외부 클릭 감지를 위한 오버레이 */
.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: none;
}

.dropdown-overlay.show {
    display: block;
}

/* ========================================
   실시간 채팅 추가 스타일 (main.css에 추가)
   ======================================== */

/* 시스템 메시지 */
.chat-system-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    margin: 0.5rem 0;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #3b82f6;
}

.system-icon {
    font-size: 1rem;
}

/* 내 메시지 */
.chat-message-mine {
    flex-direction: row-reverse;
}

.chat-message-mine .chat-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.chat-message-mine .chat-content {
    align-items: flex-end;
}

.chat-message-mine .chat-header {
    flex-direction: row-reverse;
}

.chat-message-mine .chat-text {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-radius: 0.5rem 0.5rem 0 0.5rem;
    padding: 0.5rem 0.75rem;
}

/* 채팅 입력 비활성화 상태 */
.chat-input:disabled {
    background: #09090b;
    border-color: #18181b;
    color: #52525b;
    cursor: not-allowed;
}

.chat-button:disabled {
    background: #27272a;
    border-color: #3f3f46;
    color: #52525b;
    cursor: not-allowed;
    box-shadow: none;
}

.chat-button:disabled:hover {
    transform: none;
}

/* 스크롤바 스타일 개선 */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

/* 메시지 애니메이션 */
@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message {
    animation: slideInMessage 0.2s ease-out;
}

/* 접속자 수 강조 */
.card-header span:last-child {
    padding: 0.25rem 0.5rem;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 0.375rem;
    font-weight: 700;
    color: #3b82f6;
}

/* 연결 상태 표시 */
.chat-connection-status {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.chat-connection-status.disconnected {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* 타이핑 인디케이터 (선택사항) */
.typing-indicator {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #71717a;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* ==========================================
   코인 이미지 스타일
   ========================================== */

/* 기존 coin-icon 스타일 (Fallback용으로 유지) */
.coin-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    margin-right: 0.75rem;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* ✅ 새로 추가: 코인 실제 이미지 */
.coin-icon-img {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    margin-right: 0.75rem;
    object-fit: cover;
    background: #27272a;
    flex-shrink: 0;
    border: 1px solid #3f3f46;
}

/* ✅ 새로 추가: Fallback (이미지 로딩 실패 시) */
.coin-icon-fallback {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    margin-right: 0.75rem;
    font-size: 0.875rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* 코인 정보 컨테이너 */
.coin-info {
    display: flex;
    align-items: center;
}

.coin-name {
    font-weight: 600;
    color: #e4e4e7;
    font-size: 0.9375rem;
}

/* ==========================================
   반응형
   ========================================== */

@media (max-width: 768px) {
    .coin-icon-img,
    .coin-icon-fallback {
        width: 1.75rem;
        height: 1.75rem;
        margin-right: 0.5rem;
        font-size: 0.75rem;
    }

    .coin-name {
        font-size: 0.875rem;
    }
}

/* 인증 타이머 */
#verification-timer {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: #71717a;
}

/* 인증 코드 입력 그룹 */
#verification-code-group {
    margin-top: -0.5rem;
}

#verification-code {
    font-size: 1.2rem;
    letter-spacing: 0.3rem;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.icon-button {
    position: relative;
    background: #27272a;
    border: 1px solid #3f3f46;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-button:hover {
    background: #3f3f46;
    transform: translateY(-2px);
}

.alert-history-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem; /* 추가 */
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1; /* 추가 */
}

.header-nav {
    display: flex;
    gap: 1rem;
    margin: 0 auto;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #e4e4e7;
    background: #27272a;
}

.nav-link.active {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* 반응형 */
@media (max-width: 768px) {
    .header-nav {
        display: none; /* 모바일에서 숨김 */
    }
}
/* ==========================================
   모바일 극한 최적화
   ========================================== */

/* 코인 정보 간격 조정 */
.coin-info {
    gap: 0.75rem;
}

/* 검색창 간격 조정 */
.search-input {
    padding-left: 2.5rem !important;
}

.search-icon {
    left: 0.75rem !important;
}

/* 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
    .grid-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    table {
        min-width: 750px;
    }

    th, td {
        padding: 0.5rem 0.3rem;
    }
}

/* 모바일 (768px 이하) - 초극한 압축 */
@media (max-width: 768px) {
    /* 레이아웃 */
    .grid-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* 테이블 100% */
    table {
        min-width: 100% !important;
        width: 100% !important;
    }

    /* 변동률, 거래대금 숨김 */
    th:nth-child(7), td:nth-child(7),
    th:nth-child(8), td:nth-child(8) {
        display: none;
    }

    /* 초극소 패딩 */
    th, td {
        padding: 0.3rem 0.1rem !important;
        font-size: 0.65rem !important;
    }

    th {
        font-size: 0.6rem !important;
    }

    /* 코인 정보 간격 초최소화 */
    .coin-info {
        gap: 0.2rem !important; /* 거의 붙임 */
    }

    .coin-icon-img {
        width: 15px !important;
        height: 15px !important;
    }

    .coin-name {
        font-size: 0.65rem !important;
    }

    /* 김프 배지 더 작게 */
    .premium-badge {
        font-size: 0.55rem !important;
        padding: 1px 2px !important;
    }

    /* 달러 가격 초극소 */
    td div div:nth-child(2) {
        font-size: 0.5rem !important;
        margin-top: 0px !important;
    }

    /* 검색창 초최소 간격 */
    .search-container {
        /*padding: 0.375rem 1rem !important;*/
    }

    .search-input {
        padding: 0.5rem 0.5rem 0.5rem 1.75rem !important;
        font-size: 0.7rem !important;
    }

    .search-icon {
        left: 0.375rem !important;
        font-size: 0.8125rem !important;
    }

    /* 헤더 압축 */
    .header-container {
        padding: 0.5rem 1rem !important;
    }

    .logo {
        gap: 0.375rem !important;
    }

    .logo h1 {
        font-size: 1rem !important;
    }

    .logo p {
        font-size: 0.6rem !important;
    }

    .header-info {
        gap: 0.25rem !important;
    }

    .info-badge {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.65rem !important;
    }

    /* 사이드바 */
    .sidebar-card {
        padding: 0.75rem !important;
    }

    .card-header h3 {
        font-size: 0.875rem !important;
    }
}

/* 작은 모바일 (480px 이하) */
@media (max-width: 480px) {
    th, td {
        padding: 0.2rem 0.05rem !important;
        font-size: 0.6rem !important;
    }

    th {
        font-size: 0.55rem !important;
    }

    .coin-info {
        gap: 0.15rem !important; /* 최소 간격 */
    }

    .coin-icon-img {
        width: 15px !important;
        height: 15px !important;
    }

    .coin-name {
        font-size: 0.6rem !important;
    }

    .premium-badge {
        font-size: 0.5rem !important;
        padding: 1px 1px !important;
    }

    td div div:nth-child(2) {
        font-size: 0.45rem !important;
    }

    .search-input {
        padding: 0.375rem 0.375rem 0.375rem 1.5rem !important;
        font-size: 0.65rem !important;
    }

    .search-icon {
        left: 0.25rem !important;
        font-size: 0.75rem !important;
    }

    .logo h1 {
        font-size: 0.9375rem !important;
    }

    .info-badge {
        padding: 0.2rem 0.375rem !important;
        font-size: 0.6rem !important;
    }
}

/* 코인 헤더 왼쪽 여백 추가 */
th:first-child {
    padding-left: 0.75rem !important;
}

td:first-child {
    padding-left: 0.75rem !important;
}

/* 모바일에서도 적용 */
@media (max-width: 768px) {
    th:first-child {
        padding-left: 0.5rem !important;
    }

    td:first-child {
        padding-left: 0.5rem !important;
    }
}

@media (max-width: 480px) {
    th:first-child {
        padding-left: 0.375rem !important;
    }

    td:first-child {
        padding-left: 0.375rem !important;
    }
}

/* ==========================================
   헤더 지표 버튼
========================================== */
.header-indicators {
    display: flex;
    gap: 0.5rem;
    margin-left: 2rem;
}

.indicator-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: rgba(39, 39, 42, 0.6);
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.indicator-btn:hover {
    background: rgba(39, 39, 42, 0.9);
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.indicator-btn .indicator-icon {
    font-size: 1.25rem;
}

.indicator-btn .indicator-label {
    white-space: nowrap;
}

/* 반응형 */
@media (max-width: 1024px) {
    .header-indicators {
        margin-left: 1rem;
    }

    .indicator-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .indicator-btn .indicator-label {
        display: none;
    }

    .indicator-btn .indicator-icon {
        font-size: 1.5rem;
    }
}

/* ==========================================
   모달 공통 스타일
========================================== */
.indicator-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 10000;
    overflow-y: auto;
    animation: fadeIn 0.2s ease-out;
}

.indicator-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
}

.indicator-modal-content {
    background: #0a0a0a;
    border: 1px solid #27272a;
    border-radius: 1rem;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.indicator-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #27272a;
    position: sticky;
    top: 0;
    background: #0a0a0a;
    z-index: 10;
}

.indicator-modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.indicator-modal-title .icon {
    font-size: 2rem;
}

.indicator-modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 0.5rem;
    color: #ef4444;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.indicator-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}

.indicator-modal-body {
    padding: 1.5rem;
}

/* ==========================================
   경주마 모달 스타일
========================================== */
.racehorse-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.racehorse-tab-btn {
    flex: 1;
    padding: 0.875rem;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    color: #a1a1aa;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.racehorse-tab-btn:hover {
    background: #27272a;
    color: #fff;
}

.racehorse-tab-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: #fff;
}

.racehorse-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.racehorse-card {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: all 0.3s;
}

.racehorse-card:hover {
    background: #27272a;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.racehorse-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.racehorse-rank-large {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 800;
    color: #000;
}

.racehorse-rank-large.rank-1 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.racehorse-rank-large.rank-2 {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
}

.racehorse-rank-large.rank-3 {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.racehorse-rank-large.rank-4,
.racehorse-rank-large.rank-5,
.racehorse-rank-large.rank-6,
.racehorse-rank-large.rank-7,
.racehorse-rank-large.rank-8,
.racehorse-rank-large.rank-9,
.racehorse-rank-large.rank-10 {
    background: #3f3f46;
    color: #a1a1aa;
}

.racehorse-coin-info {
    flex: 1;
    margin-left: 1rem;
}

.racehorse-coin-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.racehorse-coin-price {
    font-size: 0.875rem;
    color: #71717a;
}

.racehorse-change-large {
    font-size: 1.5rem;
    font-weight: 800;
    color: #10b981;
}

.racehorse-change-large.negative {
    color: #ef4444;
}

.racehorse-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #27272a;
}

.racehorse-stat {
    text-align: center;
}

.racehorse-stat-label {
    font-size: 0.75rem;
    color: #71717a;
    margin-bottom: 0.25rem;
}

.racehorse-stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
}

/* ==========================================
   롱숏비율 모달 스타일
========================================== */
.longshort-coins {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.longshort-coin-card {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.longshort-coin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.longshort-coin-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.longshort-coin-price {
    font-size: 1rem;
    color: #71717a;
}

.longshort-gauges {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.longshort-gauge-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.longshort-gauge-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.longshort-gauge-title {
    color: #a1a1aa;
}

.longshort-gauge-value {
    font-weight: 700;
    color: #fff;
}

.longshort-gauge-bar {
    display: flex;
    height: 48px;
    border-radius: 0.5rem;
    overflow: hidden;
}

.longshort-gauge-long {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    transition: width 0.5s ease;
}

.longshort-gauge-short {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    transition: width 0.5s ease;
}

/* ==========================================
   펀딩비 모달 스타일
========================================== */
.funding-coins-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.funding-coin-tab {
    padding: 0.625rem 1rem;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    color: #a1a1aa;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.funding-coin-tab:hover {
    background: #27272a;
    color: #fff;
}

.funding-coin-tab.active {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-color: #fbbf24;
    color: #000;
}

.funding-table-container {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.75rem;
    overflow: hidden;
}

.funding-table {
    width: 100%;
    border-collapse: collapse;
}

.funding-table thead {
    background: #27272a;
}

.funding-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: #a1a1aa;
    border-bottom: 1px solid #3f3f46;
}

.funding-table td {
    padding: 1rem;
    font-size: 0.875rem;
    color: #fff;
    border-bottom: 1px solid #27272a;
}

.funding-table tbody tr:hover {
    background: #27272a;
}

.funding-exchange-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.funding-exchange-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #3f3f46;
}

.funding-exchange-name {
    font-weight: 600;
}

.funding-rate-cell {
    font-weight: 700;
    font-size: 1rem;
}

.funding-rate-cell.positive {
    color: #10b981;
}

.funding-rate-cell.negative {
    color: #ef4444;
}

.funding-rate-cell.neutral {
    color: #a1a1aa;
}

.funding-next-time {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: #10b981;
}

/* 반응형 */
@media (max-width: 768px) {
    .racehorse-grid {
        grid-template-columns: 1fr;
    }

    .indicator-modal-content {
        border-radius: 0;
        max-height: 100vh;
    }
}

/* 경주마 섹션 스타일 */
.racehorse-section {
    margin-bottom: 2rem;
}

.racehorse-section:last-child {
    margin-bottom: 0;
}

.racehorse-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #27272a;
}

.exchange-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 700;
}

.upbit-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

.bithumb-badge {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
}

/* 경주마 그리드 - 2열 레이아웃 */
.racehorse-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 1200px) {
    .racehorse-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   경주마 - 가로 배치 & 컴팩트 디자인
========================================== */

/* 가로 2열 레이아웃 */
.racehorse-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.racehorse-column {
    display: flex;
    flex-direction: column;
}

.racehorse-column-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #27272a;
}

.exchange-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.upbit-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

.bithumb-badge {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
}

/* 리스트 스타일 */
.racehorse-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.racehorse-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.racehorse-item:hover {
    background: #27272a;
    transform: translateX(4px);
    border-color: #3f3f46;
}

/* 순위 배지 */
.racehorse-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

.racehorse-rank.rank-1 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
}

.racehorse-rank.rank-2 {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    color: #000;
    box-shadow: 0 0 12px rgba(209, 213, 219, 0.5);
}

.racehorse-rank.rank-3 {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.5);
}

.racehorse-rank.rank-4,
.racehorse-rank.rank-5,
.racehorse-rank.rank-6,
.racehorse-rank.rank-7,
.racehorse-rank.rank-8,
.racehorse-rank.rank-9,
.racehorse-rank.rank-10 {
    background: #3f3f46;
    color: #a1a1aa;
}

/* 코인 정보 */
.racehorse-info {
    flex: 1;
    min-width: 0;
}

.racehorse-symbol {
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.racehorse-price {
    font-size: 0.75rem;
    color: #71717a;
    margin-top: 2px;
}

/* 통계 (컴팩트) */
.racehorse-stats-compact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.racehorse-change {
    font-size: 0.875rem;
    font-weight: 800;
    white-space: nowrap;
}

.racehorse-change.positive {
    color: #10b981;
}

.racehorse-change.negative {
    color: #ef4444;
}

.racehorse-volume {
    font-size: 0.6875rem;
    color: #71717a;
    white-space: nowrap;
}

/* 순위 변동 애니메이션 */
@keyframes rankUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes rankDown {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.racehorse-item.rank-changed-up {
    animation: rankUp 0.5s ease-out;
}

.racehorse-item.rank-changed-down {
    animation: rankDown 0.5s ease-out;
}

/* 반응형 */
@media (max-width: 1024px) {
    .racehorse-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .racehorse-item {
        padding: 0.5rem 0.75rem;
    }

    .racehorse-rank {
        width: 24px;
        height: 24px;
        font-size: 0.6875rem;
    }

    .racehorse-symbol {
        font-size: 0.8125rem;
    }

    .racehorse-change {
        font-size: 0.8125rem;
    }
}

/* ==========================================
   경주마 순위 변동 애니메이션
========================================== */

/* 순위 상승 애니메이션 */
@keyframes rankUpAnimation {
    0% {
        transform: translateY(20px);
        background: rgba(16, 185, 129, 0.2);
        border-color: #10b981;
    }
    50% {
        transform: translateY(-5px);
        background: rgba(16, 185, 129, 0.3);
        border-color: #10b981;
    }
    100% {
        transform: translateY(0);
        background: #18181b;
        border-color: #27272a;
    }
}

.racehorse-item.rank-up {
    animation: rankUpAnimation 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

/* 순위 하락 애니메이션 */
@keyframes rankDownAnimation {
    0% {
        transform: translateY(-20px);
        background: rgba(239, 68, 68, 0.2);
        border-color: #ef4444;
    }
    50% {
        transform: translateY(5px);
        background: rgba(239, 68, 68, 0.3);
        border-color: #ef4444;
    }
    100% {
        transform: translateY(0);
        background: #18181b;
        border-color: #27272a;
    }
}

.racehorse-item.rank-down {
    animation: rankDownAnimation 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* 새로 진입 애니메이션 */
@keyframes rankNewAnimation {
    0% {
        transform: scale(0.8) translateX(-30px);
        opacity: 0;
        background: rgba(251, 191, 36, 0.3);
        border-color: #fbbf24;
    }
    50% {
        transform: scale(1.05) translateX(5px);
        background: rgba(251, 191, 36, 0.4);
        border-color: #fbbf24;
    }
    100% {
        transform: scale(1) translateX(0);
        opacity: 1;
        background: #18181b;
        border-color: #27272a;
    }
}

.racehorse-item.rank-new {
    animation: rankNewAnimation 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

/* 순위 변동 표시 배지 */
.rank-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem 0.375rem;
    margin-left: 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 800;
    animation: fadeIn 0.5s ease-out;
}

.rank-indicator.up {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.rank-indicator.down {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.rank-indicator.new {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 순위 배지 펄스 애니메이션 (1등) */
@keyframes rankPulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(251, 191, 36, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.8);
    }
}

.racehorse-rank.rank-1 {
    animation: rankPulse 2s ease-in-out infinite;
}

/* 변동률 변화 애니메이션 */
@keyframes changeFlash {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.racehorse-change {
    transition: all 0.3s ease;
}

.racehorse-item.rank-up .racehorse-change,
.racehorse-item.rank-down .racehorse-change {
    animation: changeFlash 0.5s ease-out;
}

/* 호버 효과 강화 */
.racehorse-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.racehorse-item:hover {
    background: #27272a;
    transform: translateX(8px) scale(1.02);
    border-color: #3f3f46;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* 리스트 컨테이너 */
.racehorse-list {
    position: relative;
}

/* 부드러운 전환 */
.racehorse-item {
    position: relative;
    transition: all 0.3s ease;
}

/* ==========================================
   반응형 - 모바일
========================================== */

@media (max-width: 768px) {
    /* 환율 정보와 시간은 숨김 */
    .info-badge {
        display: none;
    }

    /* 시간/날짜 div 숨김 */
    .header-info > div[style*="text-align: right"] {
        display: none;
    }

    /* ✅ 지표 버튼(경주마/롱숏/펀딩)은 유지 */
    .header-indicators {
        display: flex !important;
        gap: 0.25rem;
        margin-left: 0.5rem;
    }

    /* ✅ 지표 버튼 - 텍스트 숨기고 아이콘만 */
    .indicator-btn {
        padding: 0.5rem;
    }

    .indicator-btn .indicator-label {
        display: none;
    }

    .indicator-btn .indicator-icon {
        font-size: 1.25rem;
    }

    /* ✅ 알림함 버튼 유지 */
    .header-info > div:has(.icon-button) {
        display: block !important;
    }

    /* ✅ 아이콘 버튼들 크기 조정 */
    .icon-button {
        padding: 0.5rem 0.625rem;
        font-size: 1.125rem;
    }

    /* 로그인 버튼은 표시 */
    .login-button,
    .user-button {
        display: flex !important;
    }

    .main-container {
        padding: 1rem;
    }

    .banner-content {
        height: 80px;
        font-size: 0.75rem;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.75rem;
    }

    th, td {
        padding: 0.5rem 0.25rem;
    }

    .coin-icon {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.625rem;
    }

    .coin-name {
        font-size: 0.875rem;
    }

    .premium-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .progress-bar {
        width: 3rem;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 800px;
    }
}

/* 이미지 로고 */
.funding-exchange-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 1px solid #27272a;
    flex-shrink: 0;
}

/* Fallback (이미지 로딩 실패 시) */
.funding-exchange-logo-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: #fff;
    flex-shrink: 0;
}

/* 거래소 셀 */
.funding-exchange-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.funding-exchange-name {
    font-weight: 600;
    color: #fff;
}

/* 기존 스타일 제거 */
.funding-exchange-logo {
    display: none; /* 더 이상 사용 안 함 */
}