/* 今彩539即時開獎樣式表 */

/* 基礎設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 導航列樣式 */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand i {
    margin-right: 10px;
    color: #ffd700;
}

/* 主卡片樣式 */
.lottery-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.lottery-card .card-header {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    padding: 25px;
}

.lottery-card .card-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

.lottery-card .card-header i {
    margin-right: 15px;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.update-time {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 10px;
}

/* 中獎號碼樣式 */
.numbers-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.number-ball {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff6b6b, #ee5a24);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    animation: bounceIn 0.8s ease-in-out;
}

.number-ball:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 12px 24px rgba(0,0,0,0.3),
        inset 0 2px 4px rgba(255,255,255,0.4);
}

/* 號碼球動畫 */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 特殊號碼顏色 */
.number-ball.special-1 { background: linear-gradient(145deg, #ff4757, #c44569); }
.number-ball.special-2 { background: linear-gradient(145deg, #3742fa, #2f3542); }
.number-ball.special-3 { background: linear-gradient(145deg, #2ed573, #1e90ff); }
.number-ball.special-4 { background: linear-gradient(145deg, #ffa502, #ff6348); }
.number-ball.special-5 { background: linear-gradient(145deg, #a55eea, #778beb); }

/* 獎金資訊樣式 */
.prize-info {
    text-align: center;
}

.prize-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #27ae60;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-top: 10px;
}

/* 表格樣式 */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.table thead th {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px;
    font-weight: 600;
}

.table tbody td {
    padding: 12px 15px;
    border-color: #e9ecef;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* 載入動畫 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 統計區域樣式 */
.hot-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.hot-number {
    min-width: 80px;
    padding: 15px 10px;
    border-radius: 15px;
    background: linear-gradient(145deg, #ffd700, #ffb347);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    text-align: center;
}

.hot-number .number {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.hot-number .frequency {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.hot-number .percentage {
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.8;
}

.hot-number:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.hot-number.top-1 {
    background: linear-gradient(145deg, #ff6b6b, #ee5a24);
    color: white;
}

.hot-number.top-2 {
    background: linear-gradient(145deg, #4ecdc4, #44a08d);
    color: white;
}

.hot-number.top-3 {
    background: linear-gradient(145deg, #45b7d1, #2980b9);
    color: white;
}

/* 卡片樣式 */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 15px 15px 0 0 !important;
    padding: 20px;
}

.card-header h3, 
.card-header h5 {
    margin-bottom: 0;
    font-weight: 600;
}

.card-header i {
    margin-right: 10px;
    color: #ffd700;
}

/* 按鈕樣式 */
.btn {
    border-radius: 25px;
    font-weight: 500;
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#refreshBtn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    backdrop-filter: blur(10px);
}

#refreshBtn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

/* 警告訊息樣式 */
.alert {
    border-radius: 15px;
    border: none;
    padding: 20px;
}

.alert-danger {
    background: linear-gradient(145deg, #ff6b6b, #ee5a24);
    color: white;
}

/* 頁尾樣式 */
footer {
    background: rgba(255,255,255,0.9) !important;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.1);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .numbers-container {
        gap: 10px;
    }
    
    .number-ball {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .prize-amount {
        font-size: 1.8rem;
    }
    
    .lottery-card .card-header {
        padding: 20px 15px;
    }
    
    .lottery-card .card-header h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    .number-ball {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .numbers-container {
        gap: 8px;
    }
}

/* 動畫效果 */
.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 載入中的脈衝效果 */
.loading-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* 滾動條樣式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
}

/* 廣告區域樣式 */
.adsbygoogle {
    border-radius: 10px;
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.adsbygoogle:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* 廣告標籤 */
.adsbygoogle::before {
    content: "廣告";
    position: absolute;
    top: -8px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    z-index: 1;
}

/* 響應式廣告調整 */
@media (max-width: 768px) {
    .adsbygoogle {
        margin: 10px 0;
        padding: 8px;
    }
}

/* 廣告位置特定樣式 */
.ad-top {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.ad-middle {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(238, 90, 36, 0.1));
}

.ad-bottom {
    background: linear-gradient(135deg, rgba(34, 193, 195, 0.1), rgba(253, 187, 45, 0.1));
}

/* 遊戲融合區樣式 */
.game-fusion-card .card-header {
    background: linear-gradient(45deg, #0f766e, #2563eb);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.game-item {
    display: block;
    text-decoration: none;
    border-radius: 14px;
    padding: 14px;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-item:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26);
}

.game-item h4 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
}

.game-item p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.92;
}

.quick-pick-panel {
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(15, 118, 110, 0.08), rgba(37, 99, 235, 0.08));
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 14px;
}

.quick-pick-numbers {
    display: flex;
    gap: 8px;
    min-height: 42px;
    flex-wrap: wrap;
}

.pick-ball {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #ef4444, #f97316);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.quick-pick-result {
    min-height: 24px;
    font-size: 0.92rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}