.gc-wrap { max-width: 1080px; margin: 28px auto 60px; padding: 0 16px; position: relative; z-index: 2; }
.gc-card {
    background: linear-gradient(135deg, rgba(22, 20, 28, 0.94), rgba(12, 13, 19, 0.96));
    border: 1px solid rgba(245, 200, 75, 0.35);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 18px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
}
.gc-hero-card { border-color: rgba(245, 200, 75, 0.5); }
.gc-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.gc-eyebrow { font-size: 11px; letter-spacing: 2px; color: #f5c84b; text-transform: uppercase; }
.gc-title { margin: 4px 0 0; font-size: 26px; font-weight: 800; color: #ffe694; }
.gc-subtitle { color: #a7a3b5; font-size: 14px; margin: 8px 0 0; }
.gc-pills { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gc-pill { background: rgba(10, 11, 16, 0.9); border: 1px solid rgba(245, 200, 75, 0.3); border-radius: 999px; padding: 7px 14px; font-size: 13px; color: #e8e6f0; }
.gc-pill b { color: #f5c84b; }
.gc-inline-form { margin: 0; }
.gc-btn {
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.15s ease;
}
.gc-btn-lg { padding: 11px 18px; font-size: 14px; }
.gc-btn:hover:not(:disabled) { transform: translateY(-1px); }
.gc-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.gc-btn-gold  { background: linear-gradient(180deg, #ffe694, #f5c84b); color: #171208; }
.gc-btn-green { background: linear-gradient(180deg, #5ef09f, #27b86a); color: #07190e; }
.gc-btn-ghost { background: rgba(255, 255, 255, 0.08); color: #d8d5e5; border: 1px solid rgba(255, 255, 255, 0.14); }
.gc-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.gc-spin-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gc-char-label { font-size: 13px; color: #a7a3b5; margin-right: 8px; }
.gc-input, .gc-select {
    background: #0c0d14;
    color: #f4f2fa;
    border: 1px solid rgba(245, 200, 75, 0.35);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
}
.gc-login-grid { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.gc-hint { margin-top: 10px; font-size: 12px; color: #a7a3b5; }
.gc-hint a { color: #f5c84b; text-decoration: underline; }
.gc-alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.gc-alert.success { background: rgba(61, 220, 132, 0.12); border-color: rgba(61, 220, 132, 0.45); color: #9cf5c3; }
.gc-alert.error   { background: rgba(255, 99, 99, 0.12); border-color: rgba(255, 99, 99, 0.45); color: #ffb3b3; }
.gc-alert.info    { background: rgba(245, 200, 75, 0.12); border-color: rgba(245, 200, 75, 0.45); color: #ffe694; }
.gc-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }
.gc-section-head h2 { margin: 0; font-size: 18px; color: #ffe694; }
.gc-note { font-size: 12px; color: #a7a3b5; }

.gc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}
.gc-result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 14px 10px;
    background: rgba(16, 17, 24, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    animation: gcPop 0.28s ease-out both;
}
@keyframes gcPop {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.gc-pool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 12px;
}
.gc-pool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(24, 24, 34, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.gc-pool-info { flex: 1; min-width: 0; }
.gc-pool-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 4px; }
.gc-rate { font-size: 12px; font-weight: 700; color: #d8d5e5; }

.gc-icon {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    background: #0a0b10;
    border: 1px solid rgba(245, 200, 75, 0.35);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gc-icon img { width: 50px; height: 50px; object-fit: contain; }
.gc-icon img.is-hidden { display: none; }
.gc-qty { position: absolute; right: 4px; bottom: 2px; font-size: 12px; font-weight: 800; color: #ffe694; text-shadow: 0 1px 3px #000; }
.gc-item-name { font-size: 13px; font-weight: 600; color: #f4f2fa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Rarity colors */
.gc-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
}
.gc-badge.rarity-ssr { background: rgba(245, 200, 75, 0.22); color: #ffe694; border: 1px solid rgba(245, 200, 75, 0.7); }
.gc-badge.rarity-sr  { background: rgba(186, 104, 255, 0.22); color: #e2b8ff; border: 1px solid rgba(186, 104, 255, 0.65); }
.gc-badge.rarity-r   { background: rgba(75, 192, 245, 0.2); color: #a7e4ff; border: 1px solid rgba(75, 192, 245, 0.6); }
.gc-badge.rarity-n   { background: rgba(255, 255, 255, 0.08); color: #c7c4d4; border: 1px solid rgba(255, 255, 255, 0.18); }

.gc-result-item.rarity-ssr, .gc-pool-item.rarity-ssr { border-color: rgba(245, 200, 75, 0.65); box-shadow: 0 0 18px rgba(245, 200, 75, 0.16); }
.gc-result-item.rarity-sr,  .gc-pool-item.rarity-sr  { border-color: rgba(186, 104, 255, 0.5); }
.gc-result-item.rarity-r,   .gc-pool-item.rarity-r   { border-color: rgba(75, 192, 245, 0.4); }

.gc-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.gc-log-list { display: flex; flex-direction: column; gap: 8px; }
.gc-log-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(12, 13, 19, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-size: 13px;
    color: #e8e6f0;
}
.gc-log-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gc-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #9cf5c3;
    background: rgba(61, 220, 132, 0.12);
    border: 1px solid rgba(61, 220, 132, 0.35);
    border-radius: 999px;
    padding: 3px 9px;
}
.gc-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5ef09f;
    box-shadow: 0 0 8px #5ef09f;
    animation: gcPulse 1.6s ease-in-out infinite;
}
@keyframes gcPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.8); }
}
.gc-log-clickable {
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.14s ease, background 0.14s ease, transform 0.12s ease;
}
.gc-log-clickable:hover {
    border-color: rgba(245, 200, 75, 0.45);
    background: rgba(28, 27, 38, 0.95);
    transform: translateX(2px);
}
.gc-log-time {
    font-size: 11px;
    color: #8f8ba3;
    flex-shrink: 0;
}

.gc-modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.gc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 10, 0.78);
    backdrop-filter: blur(4px);
}
.gc-modal-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    background: linear-gradient(145deg, #181722, #0d0e15);
    border: 1px solid rgba(245, 200, 75, 0.5);
    border-radius: 16px;
    padding: 18px 20px 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
    animation: gcPop 0.2s ease-out both;
}
.gc-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gc-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e8e6f0;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.gc-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 10px;
}
.gc-modal-icon {
    width: 84px;
    height: 84px;
    background: #0a0b10;
    border: 1px solid rgba(245, 200, 75, 0.45);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.gc-modal-icon img { width: 72px; height: 72px; object-fit: contain; }
.gc-modal-icon img.is-hidden { display: none; }
.gc-modal-title { margin: 0 0 14px; font-size: 18px; color: #ffe694; }
.gc-modal-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    font-size: 13px;
    color: #a7a3b5;
    background: rgba(10, 11, 16, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
}
.gc-modal-meta div { display: flex; justify-content: space-between; gap: 10px; }
.gc-modal-meta b { color: #f4f2fa; }

.gc-results-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
    background: rgba(10, 11, 16, 0.82);
    border: 1px solid rgba(245, 200, 75, 0.28);
    border-radius: 10px;
}
.gc-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 12px;
    color: #f4f2fa;
}
.gc-summary-chip b { color: #ffe694; }

/* ซ่อนองค์ประกอบที่ยังไม่เปิดใช้งาน (รวม Modal และแถบผลสุ่มเริ่มต้น) */
.is-hidden,
.gc-modal.is-hidden {
    display: none !important;
}
