/**
 * GAMEBIT index core styles.
 * Source sections preserve the original cascade order from index_m_test.php.
 */

/* Semantic replacements for legacy inline style attributes. */
.brand-game,.accent-text { color:var(--accent-red); }
.brand-bit { color:#3399ff; }
.ranking-head-spacer { flex:1; }
.sort-rate-column { width:55px; text-align:right; }
.ranking-server-name-cell { flex:1; display:flex; align-items:center; font-weight:600; }
.delay-dot,.is-hidden,.partner-rolling-box { display:none; }
.ranking-server-price { margin-right:10px; color:#bbb; font-size:13px; }
.ranking-server-rate { width:55px; text-align:right; font-weight:800; }
.display-unit-label { font-size:9px; }
.chart-header-actions,.panel-title-row { display:flex; align-items:center; gap:6px; }
.chart-main-area { position:relative; min-width:0; height:100%; flex:7.8; }
.chart-marker-control { position:absolute; top:10px; right:58px; z-index:25; padding:5px 8px; display:inline-flex; align-items:center; gap:6px; border:1px solid #2e2e2e; border-radius:8px; color:#bdbdbd; background:rgba(18,18,18,.78); font-size:11px; cursor:pointer; user-select:none; }
.chart-marker-control input { margin:0; accent-color:#ff5252; }
.panel-card-column { display:flex; flex-direction:column; }
.panel-header-standard { height:48px; padding-bottom:12px; border-bottom:2px solid #333; }
.panel-header-between { justify-content:space-between; }
.panel-title-row { gap:8px; }
.panel-live-dot { width:8px; height:8px; border-radius:50%; background:#ff5252; box-shadow:0 0 6px #ff5252; animation:liveBlink 1s infinite; }
.panel-more-link { padding:4px; color:#888; text-decoration:none; font-size:11px; }
.partner-rolling-box { flex-shrink:0; border-bottom:1px solid #333; background:#1a1a1a; }
.panel-body-live { padding:0; flex:1; overflow-y:auto; }
.discussion-panel-icon { width:16px; height:16px; display:inline-flex; align-items:center; justify-content:center; color:#ff8a6d; filter:drop-shadow(0 0 6px rgba(255,138,109,.28)); }
.discussion-topic-state { color:#777; font-size:11px; }
.panel-body-flush { padding:0; }
.panel-tabs-header { padding:0; display:flex; border-bottom:1px solid #333; }
.panel-tab { padding:12px 0; flex:1; border-bottom:2px solid transparent; color:#888; text-align:center; font-size:14px; font-weight:bold; cursor:pointer; transition:.2s; }
.panel-tab.active { border-bottom-color:var(--accent-red); color:inherit; }
.panel-body-grow { flex:1; }
.modal-close-corner { position:absolute; top:14px; right:18px; z-index:2; color:#888; font-size:26px; cursor:pointer; }
.modal-form-title,.notice-title { margin:0 0 18px; color:#fff; font-size:18px; }
.modal-form-title-wide { margin-bottom:20px; }
.submit-btn-spaced { margin-top:13px; }
.notice-modal { position:fixed; inset:0; z-index:9999; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,.75); }
.notice-dialog { position:relative; width:90%; max-width:450px; max-height:85vh; padding:25px; display:flex; flex-direction:column; border:1px solid #333; border-radius:8px; color:#d4d4d4; background:#1a1a1a; box-shadow:0 4px 20px rgba(0,0,0,.8); }
.notice-close { position:absolute; top:15px; right:20px; color:#888; font-size:26px; cursor:pointer; }
.notice-title { margin-bottom:15px; }
.notice-body { margin-bottom:20px; padding-right:5px; overflow-y:auto; font-size:13px; line-height:1.6; }
.notice-confirm { width:100%; padding:10px; border:0; border-radius:4px; color:#fff; background:#ff5252; font-size:14px; font-weight:bold; cursor:pointer; }
.named-bj-field { margin-top:20px; margin-bottom:25px; }
.accent-checkbox { width:16px; height:16px; accent-color:var(--accent-red); }
.modal-helper-copy { margin-top:12px; color:#666; font-size:11px; text-align:center; }
.comment-vote-summary { color:#aaa; font-size:13px; font-weight:bold; }
.comment-guidance { margin-top:8px; color:#666; font-size:10px; text-align:right; }
.site-footer { margin:40px 0; padding:20px 15px; border-top:1px solid #333; text-align:center; }
.footer-logo { margin-bottom:10px; font-size:18px; font-weight:900; }
.footer-copy { max-width:720px; margin:0 auto; color:#666; font-size:11px; line-height:1.6; }
.footer-partner-copy { margin-top:15px; color:#444; font-size:10px; }
.footer-partner-copy strong { color:#666; }

/* Base layout and component overrides. */

	/* 깜빡임 애니메이션 정의 (회색 <-> 흰색) */
	@keyframes blinkGrayWhite {
		0% { color: #888888; }
		50% { color: #ffffff; }
		100% { color: #888888; }
	}
	
	@keyframes liveBlink {
		  0%, 100% { opacity: 1; }
		  50% { opacity: 0.2; }
	  }
	  

	/* LIVE 메뉴가 비활성화 상태일 때만 애니메이션 적용 */
	.header-menu-link[href*="/live"]:not(.active) {
		animation: blinkGrayWhite 1.5s infinite ease-in-out;
	}
	

/* Header, panels, charts and shared dialogs. */
	.discussion-list {
		display: flex;
		flex-direction: column;
		height: 100%;
	}
	.discussion-summary {
		display: grid;
		grid-template-columns: 22px minmax(0, 1fr);
		align-items: center;
		gap: 8px;
		height: 44px;
		min-height: 44px;
		padding: 0 15px;
		box-sizing: border-box;
		flex-shrink: 0;
		cursor: pointer;
		background: transparent;
		transition: background 0.2s;
	}
	.discussion-summary:hover {
		background: #252525;
	}
	.discussion-summary-index {
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.discussion-summary-no {
		font-size: 12px;
		line-height: 1;
		font-weight: 900;
		color: #888;
		letter-spacing: -0.02em;
	}
	.discussion-summary-badge,
	.discussion-mode-badge {
		display: inline-flex;
		align-items: center;
		width: fit-content;
		font-size: 9px;
		font-weight: 900;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: #ff9d8f;
	}
	.discussion-summary-main {
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: 0;
	}
	.discussion-summary-title {
		font-size: 13px;
		font-weight: 600;
		color: var(--text-main);
		line-height: 1.3;
		display: block;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
	.discussion-summary-body {
		display: none;
	}
	.discussion-open-btn {
		font-size: 10px;
		font-weight: 900;
		letter-spacing: 0.08em;
		color: #f05340;
	}
	.discussion-meta-text {
		font-size: 11px;
		color: var(--text-main);
	}
	.discussion-modal-content {
		max-width: 760px;
		width: 92%;
		max-height: 88vh;
		padding: 18px;
		background:
			radial-gradient(circle at top left, rgba(214, 54, 54, 0.12), transparent 28%),
			linear-gradient(180deg, #181818, #101010);
		border: 1px solid #2d2d2d;
	}
	.discussion-modal-scroll {
		display: flex;
		flex-direction: column;
		min-height: 0;
		overflow: hidden;
	}
	.discussion-modal-body {
		overflow-y: auto;
		padding-right: 4px;
		display: flex;
		flex-direction: column;
		gap: 16px;
	}
	.discussion-modal-topic {
		position: relative;
		padding: 16px 16px 14px;
		border: 1px solid #2f2f2f;
		background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
	}
	.discussion-modal-topic::before {
		content: '';
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 3px;
		background: linear-gradient(90deg, #f05340, #ffb35c);
	}
	.discussion-modal-title {
		font-size: 19px;
		font-weight: 900;
		color: #fff;
		line-height: 1.45;
		margin: 0 0 10px;
	}
	.discussion-modal-text {
		font-size: 13px;
		line-height: 1.75;
		color: #c9c9c9;
		white-space: pre-wrap;
		word-break: break-word;
	}
	.discussion-vote-box {
		display: grid;
		gap: 9px;
	}
	.discussion-vote-option {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		gap: 12px;
		width: 100%;
		border: 1px solid #303030;
		border-left-width: 4px;
		border-radius: 0;
		background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
		color: #dfdfdf;
		padding: 12px 14px;
		font-size: 12px;
		font-weight: 800;
		cursor: pointer;
		transition: 0.18s ease;
	}
	.discussion-vote-option:hover {
		border-color: #555;
		transform: translateX(2px);
	}
	.discussion-vote-option.is-voted {
		border-color: #f05340;
		background: linear-gradient(90deg, rgba(240,83,64,0.14), rgba(255,255,255,0));
		color: #fff;
	}
	.discussion-vote-option:disabled {
		cursor: pointer;
		opacity: 1;
	}
	.discussion-vote-label {
		display: flex;
		align-items: center;
		gap: 10px;
		min-width: 0;
	}
	.discussion-vote-mark {
		font-size: 10px;
		font-weight: 900;
		color: #ff9c8b;
		letter-spacing: 0.08em;
		flex-shrink: 0;
	}
	.discussion-vote-meta {
		font-size: 11px;
		color: #8e8e8e;
		font-weight: 900;
	}
	.discussion-comments {
		display: flex;
		flex-direction: column;
		gap: 8px;
	}
	.discussion-comment {
		padding: 12px 14px;
		border-left: 2px solid #313131;
		background: #151515;
	}
	.discussion-comment-meta {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		font-size: 10px;
		color: #777;
		margin-bottom: 7px;
		text-transform: uppercase;
		letter-spacing: 0.04em;
	}
	.discussion-comment-text {
		font-size: 12px;
		color: #dbdbdb;
		line-height: 1.65;
		white-space: pre-wrap;
		word-break: break-word;
	}
	.discussion-form {
		display: flex;
		gap: 8px;
		margin-top: 2px;
	}
	.discussion-form textarea {
		flex: 1;
		min-height: 74px;
		padding: 10px 12px;
		border: 1px solid #333;
		border-radius: 0;
		background: #121212;
		color: #eee;
		font-size: 12px;
		font-family: inherit;
		outline: none;
		resize: vertical;
	}
	.discussion-form button {
		flex: 0 0 90px;
		border: 1px solid #3c3c3c;
		border-radius: 0;
		background: #1d1d1d;
		color: #fff;
		font-size: 12px;
		font-weight: 800;
		cursor: pointer;
	}
	.discussion-empty {
		padding: 20px 15px;
		text-align: center;
		font-size: 12px;
		color: #666;
	}
	

/* Advertising, discussions and content panels. */
	@media (min-width: 1381px) {
		.header-inner {
			max-width: 1500px;
			padding: 0 20px;
		}

		.container {
			max-width: 1500px;
			gap: 24px;
			padding: 0 20px;
		}

		.ranking-panel {
			height: 1055px !important;
		}

		.site-logo {
			font-size: 26px;
		}

		.header-menu-link {
			font-size: 17px;
		}

		#chart-div {
			flex: 1 1 auto !important;
			width: auto !important;
			min-width: 0 !important;
		}

		.live-trades {
			flex: 0 0 230px !important;
			width: 230px !important;
			min-width: 230px !important;
			max-width: 230px !important;
		}

		.bottom-panels {
			gap: 24px;
		}
	}
	@media (min-width: 1081px) and (max-width: 1380px) {
		.container {
			display: grid;
			grid-template-columns: 300px minmax(0, 1fr);
			align-items: stretch;
		}

		.ranking-panel {
			height: auto !important;
			min-height: 100%;
			align-self: stretch;
		}

		.main-content {
			min-width: 0;
		}
	}
	.ad-banner-shell {
		margin-bottom: 18px;
	}
	.ad-banner-grid {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 12px;
	}
	.ad-banner-slot {
		position: relative;
		height: 88px;
		border: 1px solid #2c2c2c;
		border-radius: 10px;
		background: #161616;
		overflow: hidden;
	}
	.ad-banner-slot.is-empty {
		cursor: pointer;
	}
	.ad-banner-slot.is-empty:hover {
		border-color: #444;
		background: linear-gradient(180deg, #1b1b1b 0%, #121212 100%);
	}
	.ad-banner-slot-button,
	.ad-banner-link {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 100%;
		border: 0;
		background: transparent;
		text-decoration: none;
		color: inherit;
		padding: 0;
	}
	.ad-banner-link img {
		width: 100%;
		height: 100%;
		/*object-fit: cover;*/
		display: block;
	}
	.ad-banner-empty-inner {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 4px;
		color: #8c8c8c;
	}
	.ad-banner-empty-plus {
		font-size: 24px;
		font-weight: 300;
		line-height: 1;
		color: #cfcfcf;
	}
	.ad-banner-empty-text {
		font-size: 10px;
		letter-spacing: .02em;
	}
	.ad-banner-slot-caption {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		padding: 6px 8px;
		font-size: 10px;
		color: #fff;
		background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.82) 100%);
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.ad-request-modal-content {
		max-width: 520px;
	}
	.ad-request-form {
		display: grid;
		/*gap: 12px;*/
	}
	.ad-request-grid {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
	.ad-request-form label {
		display: block;
		margin-bottom: 8px;
		font-size: 12px;
		color: #bdbdbd;
	}
	.ad-request-form .form-group {
		display: block;
		width: 100%;
	}
	.ad-request-form input[type="text"],
	.ad-request-form input[type="url"],
	.ad-request-form textarea {
		width: 100%;
		padding: 10px 12px;
		background: var(--bg-input);
		border: 1px solid #333;
		border-radius: 6px;
		color: #fff;
	}
	.ad-request-form textarea {
		min-height: 110px;
		resize: vertical;
		line-height: 1.5;
	}
	.ad-request-help {
		font-size: 13px;
		line-height: 1.6;
		color: #777;
	}
	.layer-popup-overlay {
		display: none;
		position: fixed;
		inset: 0;
		z-index: 99999;
		background: rgba(0, 0, 0, 0.72);
		align-items: center;
		justify-content: center;
		padding: 18px;
	}
	.layer-popup-panel {
		position: relative;
		width: min(92vw, 860px);
		max-height: calc(100vh - 36px);
		background: #151515;
		border: 1px solid #2c2c2c;
		border-radius: 16px;
		box-shadow: 0 28px 60px rgba(0,0,0,.45);
		overflow: hidden;
	}
	.layer-popup-close {
		position: absolute;
		top: 10px;
		right: 10px;
		width: 34px;
		height: 34px;
		border: 0;
		border-radius: 999px;
		background: rgba(0,0,0,.55);
		color: #fff;
		font-size: 18px;
		line-height: 1;
		cursor: pointer;
		z-index: 2;
	}
	.layer-popup-link {
		display: block;
		width: 100%;
		background: #0f0f0f;
	}
	.layer-popup-image {
		display: block;
		width: 100%;
		height: auto;
		max-height: calc(100vh - 150px);
		object-fit: contain;
		background: #111;
	}
	.layer-popup-footer {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 12px 14px;
		border-top: 1px solid #2c2c2c;
		background: #181818;
	}
	.layer-popup-title {
		min-width: 0;
		font-size: 13px;
		font-weight: 700;
		color: #ddd;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.layer-popup-actions {
		display: flex;
		align-items: center;
		gap: 8px;
		flex-shrink: 0;
	}
	.layer-popup-btn {
		height: 34px;
		padding: 0 12px;
		border: 1px solid #3a3a3a;
		border-radius: 8px;
		background: #242424;
		color: #fff;
		font-size: 12px;
		font-weight: 700;
		cursor: pointer;
	}
	.layer-popup-btn:hover {
		background: #2d2d2d;
	}
	@media (max-width: 768px) {
		.ad-banner-grid {
			grid-template-columns: repeat(2, minmax(0, 1fr));
			gap: 14px;
		}
		.ad-banner-shell {
			/*margin-top: 14px;
			margin-bottom: 14px;*/
			margin-top: -15px;
			margin-bottom: 0px;
		}
		.layer-popup-overlay {
			padding: 10px;
		}
		.layer-popup-panel {
			width: 100%;
			border-radius: 14px;
		}
		.layer-popup-image {
			max-height: calc(100vh - 132px);
		}
		.layer-popup-footer {
			flex-direction: column;
			align-items: stretch;
		}
		.layer-popup-actions {
			width: 100%;
			justify-content: space-between;
		}
		.layer-popup-btn {
			flex: 1;
		}
	}
	@media (max-width: 640px) {
		.ad-request-grid {
			grid-template-columns: 1fr;
		}
	}
	

/* Live broadcast and server feature presentation. */
    .channel-shell {
        display: none;
        border-bottom: 1px solid var(--border);
        background: #171717;
        padding: 8px 12px;
    }
    .channel-shell.is-visible {
        display: block;
    }
    .channel-head {
        display: none;
    }
    .channel-head strong {
        color: #fff;
        font-size: 13px;
    }
    .channel-head span {
        display: none;
    }
    .channel-tabs {
        display: grid;
        grid-template-columns: repeat(var(--channel-tab-count, 10), minmax(0, 1fr));
        gap: 8px;
        padding-bottom: 2px;
    }
    .channel-tab {
        min-width: 0;
        box-sizing: border-box;
        border: 1px solid #343434;
        border-radius: 9px;
        background: #202020;
        color: #d8d8d8;
        padding: 8px 7px;
        cursor: pointer;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
    }
    .channel-tab.is-active {
        border-color: var(--accent-red);
        background: #202020;
        box-shadow: 0 0 0 1px rgba(255, 75, 75, 0.18);
    }
    .channel-tab-name {
        display: block;
        font-size: 12px;
        font-weight: 800;
        color: var(--text-main);
    }
    .channel-tab-price {
        display: block;
        margin-top: 4px;
        font-size: 12px;
        color: var(--text-main);
        font-weight: 900;
    }
    .channel-tab-rate {
        margin-left: 4px;
        font-size: 11px;
        color: #9aa0a6;
    }
    .channel-tab-rate.is-up {
        color: #ff5252;
    }
    .channel-tab-rate.is-down {
        color: #4d91ff;
    }
    .channel-tab-rate.is-flat {
        color: #9aa0a6;
    }
    .channel-pager {
        display: none;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        margin-top: 8px;
        color: #8d96a3;
        font-size: 11px;
    }
    .channel-pager.is-visible {
        display: flex;
    }
    @media (min-width: 1381px) {
        body.is-channel-game .panel-card {
            height: max(320px, calc(488px - var(--channel-shell-height, 0px)));
        }
    }
    @media (min-width: 1081px) and (max-width: 1380px) {
        body.is-channel-game .panel-card {
            height: max(240px, calc(340px - var(--channel-shell-height, 0px)));
        }
    }
    .channel-page-btn {
        border: 1px solid #3a3a3a;
        background: #232323;
        color: #ddd;
        border-radius: 7px;
        padding: 5px 9px;
        font-size: 11px;
        cursor: pointer;
    }
    @media (max-width: 768px) {
        .channel-tabs {
            grid-template-columns: repeat(var(--channel-tab-mobile-count, 5), minmax(0, 1fr));
        }
        .channel-tab {
            padding: 7px 8px;
        }
    }
