.lot-hub {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: var(--shadow-card);
}

.lot-hub-inner {
    position: relative;
}

/* Tab bar */
.lot-hub-tabs {
    display: flex;
    align-items: stretch;
    border-bottom: none;
    background: linear-gradient(135deg, #8b6914, var(--accent), #e8c36a);
}

.lot-hub-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
    user-select: none;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.lot-hub-tab i {
    font-size: 13px;
}

.lot-hub-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.lot-hub-tab.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-bottom-color: #fff;
}

.lot-hub-tab.active i {
    color: #fff;
}

/* Tab panels */
.lot-hub-panel {
    display: none;
}

.lot-hub-panel.active {
    display: block;
}

/* ---- Categories section ---- */
.lot-hub-cats {
    padding: 10px 18px 14px;
}

.lot-cat-row {
    display: flex;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.lot-cat-row:last-child {
    border-bottom: none;
}

.lot-cat-label {
    flex-shrink: 0;
    width: 90px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.lot-cat-label i {
    font-size: 14px;
    color: var(--accent);
    width: 16px;
    text-align: center;
}

.lot-cat-types {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    flex: 1;
    min-width: 0;
}

.lot-cat-type {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
    border: 1px solid transparent;
}

.lot-cat-type:hover {
    color: var(--accent-dark);
    background: rgba(212, 168, 83, 0.08);
    border-color: rgba(212, 168, 83, 0.2);
}

/* ============================================
   Lottery Hall - Type Icons Grid
   ============================================ */
.lottery-type-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 0;
    padding: 20px 16px;
    justify-content: space-around;
}

.lottery-type-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
    width: 108px;
}

.lottery-type-item:hover {
    /* no transform to prevent visual jump */
}

.lottery-type-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    transition: all var(--transition-normal);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.lottery-type-item:hover .lottery-type-icon {
    border-color: var(--accent);
    box-shadow:
        0 0 0 3px rgba(212, 168, 83, 0.15),
        0 4px 16px rgba(212, 168, 83, 0.2);
}

.lottery-type-name {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 108px;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.lottery-type-item:hover .lottery-type-name {
    color: var(--accent-dark);
}

/* ============================================
   Lottery Detail Card - Light Theme
   ============================================ */
.lottery-detail-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
}

.lottery-detail-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #8b6914, var(--accent), #e8c36a);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.lottery-detail-topbar i {
    font-size: 14px;
}

/* ---- Detail Top: 3-column layout ---- */
.detail-top {
    display: flex;
    align-items: stretch;
    padding: 20px 24px;
    gap: 20px;
}

/* Column 1: Logo */
.detail-col-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.detail-logo {
    width: 88px;
    height: 88px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: block;
}

.detail-logo-fallback {
    width: 88px;
    height: 88px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #c49a3a);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Column 2: Info + Numbers */
.detail-col-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

/* Info line: name + period + schedule */
.detail-row-info {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 10px;
}

.detail-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
}

.detail-period {
    font-size: 13px;
    color: var(--accent-dark);
    font-weight: 600;
    white-space: nowrap;
}

.detail-schedule-text {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Numbers row */
.detail-row-numbers {
    min-height: 42px;
}

.detail-numbers .ball-row {
    justify-content: flex-start;
    margin-bottom: 4px;
}

.detail-numbers .ball-row:last-child {
    margin-bottom: 0;
}

.detail-numbers .ball {
    width: 42px;
    height: 42px;
    font-size: 17px;
}

/* Column 3: Countdown + Video side by side */
.detail-col-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

/* Countdown */
.detail-countdown {
    text-align: center;
    white-space: nowrap;
}

.detail-countdown .countdown-label {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.detail-countdown .countdown-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: "SF Mono", "Courier New", monospace;
    font-weight: 800;
}

.detail-countdown .countdown-timer .cd-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 7px;
    background: linear-gradient(180deg, #f8f9fc, #eef0f5);
    color: var(--accent-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-size: 18px;
    line-height: 1;
}

.detail-countdown .countdown-timer .cd-sep {
    display: inline-flex;
    align-items: center;
    height: 34px;
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
    padding: 0 1px;
}

.detail-countdown .countdown-timer .drawing {
    font-size: 14px;
    color: var(--accent-dark);
    font-family: inherit;
    letter-spacing: 0;
}

/* Video cover — natural size, no crop */
.detail-video {
    flex-shrink: 0;
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.detail-video img {
    height: 88px;
    width: auto;
    display: block;
    border-radius: var(--radius-md);
    transition: transform var(--transition-normal);
}

.detail-video:hover img {
    transform: scale(1.03);
}


/* ============================================
   History Table - Premium with Alternating Rows
   ============================================ */
.history-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: none;
    background: linear-gradient(135deg, #8b6914, var(--accent), #e8c36a);
}

.history-header h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.history-header h3 i {
    color: #fff;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-quick-btns {
    display: flex;
    gap: 0;
}

.date-quick-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.date-quick-btn:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.date-quick-btn:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.date-quick-btn:not(:first-child) {
    border-left: none;
}

.date-quick-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
}

.date-quick-btn.active {
    color: var(--accent-dark);
    background: #fff;
    border-color: #fff;
    font-weight: 700;
}

.date-quick-btn.active + .date-quick-btn {
    border-left-color: rgba(255, 255, 255, 0.25);
}

.date-filter input {
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    font-size: 13px;
    width: 150px;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.date-filter input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.date-filter input:focus {
    background: #fff;
    color: var(--text-primary);
    border-color: #fff;
    outline: none;
}

/* ---- History Column Toggle (mobile) ---- */
.th-toggle-btns {
    display: none;
    gap: 4px;
}

.cell-stat {
    display: none;
    font-size: 12px;
    line-height: 1.8;
    white-space: normal;
    word-break: keep-all;
}

.col-toggle-btn {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 20px;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.col-toggle-btn.active {
    background: var(--accent);
    color: #fff;
}

.history-table-wrapper {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.history-table thead th {
    background: linear-gradient(135deg, #f7f8fb, #f1f3f8);
    padding: 12px 14px;
    text-align: center;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.history-table tbody td {
    padding: 12px 14px;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

/* Alternating row colors */
.history-table tbody tr:nth-child(even) {
    background: rgba(247, 248, 251, 0.5);
}

.history-table tbody tr:hover {
    background: rgba(212, 168, 83, 0.04);
}

/* Highlighted first row */
.history-table tbody tr:first-child {
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.06), rgba(212, 168, 83, 0.02));
    font-weight: 600;
}

.history-table tbody tr:first-child td {
    border-bottom: 2px solid rgba(212, 168, 83, 0.15);
}

.history-table .numbers-cell {
    text-align: left;
    white-space: normal;
}

.history-table .numbers-cell .ball-row {
    margin-bottom: 2px;
}

.history-table .numbers-cell .ball-row:last-child {
    margin-bottom: 0;
}

.history-table .numbers-cell .ball {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.history-table .numbers-cell .ball-plus {
    height: 32px;
    font-size: 15px;
    width: 18px;
}

.history-table .numbers-cell .zodiac {
    font-size: 10px;
}

.history-table .big { color: var(--danger); font-weight: 700; }
.history-table .small { color: var(--success); font-weight: 700; }
.history-table .odd { color: var(--danger); font-weight: 600; }
.history-table .even { color: var(--info); font-weight: 600; }
.history-table .dragon { color: var(--danger); font-weight: 700; }
.history-table .tiger { color: var(--info); font-weight: 700; }

.load-more-btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: linear-gradient(135deg, var(--bg-sidebar), rgba(255, 255, 255, 0.8));
    transition: all var(--transition-normal);
}

.load-more-btn:hover {
    color: var(--accent-dark);
    background: linear-gradient(135deg, rgba(212, 168, 83, 0.06), rgba(212, 168, 83, 0.02));
}

/* ============================================
   Sidebar Ad
   ============================================ */
.sidebar-ad {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-normal);
    margin-top: 14px;
}

.sidebar-ad:hover {
    box-shadow: var(--shadow-md);
}

.sidebar-ad img {
    width: 100%;
    display: block;
}
