/* =========================================
   UNIFIED HISTORY & RESULT CARDS
   ========================================= */

.result-item,
.history-item {
    margin-bottom: 12px;
}

.result-card,
.history-card {
    display: flex;
    align-items: center;
    background: rgba(30, 30, 30, 0.45) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 14px 16px;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.result-card:active,
.history-card:active {
    transform: scale(0.97);
    background: rgba(40, 40, 40, 0.6) !important;
}

/* Expanded State for Header */
.result-card.expanded,
.history-card.expanded {
    border-radius: 16px 16px 0 0 !important;
    background: rgba(45, 45, 45, 0.6) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Icon Container - Standardized White Circular Base */
.history-card-icon-container {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.result-card:hover .history-card-icon-container,
.history-card:hover .history-card-icon-container {
    transform: scale(1.05);
}

/* Icon Variants for Transactions */
.history-card-icon-container.bg-success-light {
    background: linear-gradient(135deg, #2e7d32, #4caf50) !important;
    color: #fff !important;
}

.history-card-icon-container.bg-danger-light {
    background: linear-gradient(135deg, #c62828, #f44336) !important;
    color: #fff !important;
}

.result-img,
.bet-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-emoji,
.bet-card-emoji {
    font-size: 1.6rem;
}

/* Info Section */
.trans-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.trans-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trans-date {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
}

/* Stats Section */
.trans-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
}

.result-number-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffc107 !important;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
    line-height: 1;
}

.trans-amount {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}

.text-success {
    color: #4caf50 !important;
}

.text-danger {
    color: #f44336 !important;
}

/* Status Badges */
.trans-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.status-completed {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.status-failed {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

/* Expanded Details Container */
.expanded-details {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.expanded-details.open {
    max-height: 10000px;
    opacity: 1;
    padding: 16px;
    background: rgba(35, 35, 35, 0.5) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: none !important;
    border-bottom: 2px solid rgba(255, 193, 7, 0.2) !important;
    border-radius: 0 0 16px 16px !important;
    margin-top: -1px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.detail-value {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 500;
    text-align: right;
}

.small-id {
    font-size: 0.75rem;
    font-family: monospace;
    color: rgba(255, 255, 255, 0.4);
}

/* Result Detail Items - NO CARD, just content */
.result-detail-item {
    margin-bottom: 20px;
    padding: 0;
    background: transparent !important;
    border-radius: 0;
    border: none !important;
}

.result-detail-item:last-child {
    margin-bottom: 0;
}

.result-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.prize-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffc107;
}

.white-text {
    color: #fff;
}

.prize-number {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    margin-left: 8px;
}

.prize-index {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.winners-section {
    margin-top: 8px;
}

.winners-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffc107;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.winners-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.winner-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    background: transparent !important;
    border-radius: 0;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.winner-row:last-child {
    border-bottom: none;
}

.winner-info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.winner-name-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.winner-phone-last4 {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.winner-modality {
    font-size: 0.7rem;
    color: #ffc107;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.winner-prize-col {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.winner-prize-amount {
    font-size: 1rem;
    font-weight: 700;
    color: #4caf50;
}

.winner-guess-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.no-winners-msg {
    padding: 16px;
    text-align: center;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(244, 67, 54, 0.2);
}

.no-winners-msg span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}