/* MarkSix Firebase v2 Styles - 固定行高版本 */

/* 基本容器樣式 */
.marksix-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.marksix-title {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: bold;
}

/* APP 風格容器 */
.marksix-app-style-container {
    max-width: 100%;
    margin: 20px auto;
    background-color: #f2f2f2;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.marksix-app-title {
    font-size: 38px;
    font-weight: 900;
    color: #0B3662;
    text-align: center;
    padding: 15px 0 5px;
    margin: 0;
}

.marksix-app-info {
    padding: 10px 20px;
    background-color: #e0e0e0;
}

.period-date-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

/* 號碼顯示區域 */
.marksix-numbers-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px;
    background-color: #f2f2f2;
}

.marksix-numbers-only {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px;
}

/* 波波容器 */
.ball-container {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ball-container-small {
    position: relative;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 波波圖片 */
.ball-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.ball-image:hover {
    transform: scale(1.1);
}

.ball-image-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* 備用波波樣式 */
.ball-fallback {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    transition: transform 0.2s ease;
}

.ball-fallback:hover {
    transform: scale(1.1);
}

.ball-fallback-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* 波波顏色 */
.ball-red { background: linear-gradient(135deg, #ff4444, #cc0000); }
.ball-blue { background: linear-gradient(135deg, #4444ff, #0000cc); }
.ball-green { background: linear-gradient(135deg, #44ff44, #00cc00); }
.ball-gray { background: linear-gradient(135deg, #888888, #555555); }

/* 特別號碼 */
.ball-special {
    border: 3px solid #ffd700 !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* 加號 */
.plus-symbol, .plus, .plus-small {
    font-size: 24px;
    font-weight: bold;
    color: #666;
    margin: 0 5px;
}

.plus-small {
    font-size: 16px;
}

/* 派彩表格 */
.marksix-prizes-section {
    padding: 0;
}

.marksix-prizes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    background-color: white;
}

.marksix-prizes-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.prize-name {
    font-weight: bold;
    color: #333;
    width: 35%;
}

.prize-amount {
    font-weight: bold;
    color: #d32f2f;
    text-align: right;
    width: 35%;
}

.prize-note {
    color: #666;
    font-size: 14px;
    text-align: right;
    width: 30%;
}

/* 交替行顏色 */
.odd-row {
    background-color: #f9f9f9;
}

.even-row {
    background-color: white;
}

/* 下期資訊 */
.next-draw-row td, .jackpot-row td {
    font-weight: bold;
}

.next-draw-info {
    color: #1976d2;
    text-align: right;
}

.jackpot-amount {
    color: #d32f2f;
    text-align: right;
}

/* 分隔線 */
.prize-separator {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 0;
}

.separator-row td {
    padding: 5px 0;
}

/* 歷史表格 - 固定行高版本 */
.marksix-table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.marksix-history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    table-layout: fixed;
}

.marksix-history-table th {
    background: #0B3662;
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    vertical-align: middle;
    height: 50px;
}

.marksix-history-table th:nth-child(1) { width: 20%; } /* 期數 */
.marksix-history-table th:nth-child(2) { width: 25%; } /* 日期 */
.marksix-history-table th:nth-child(3) { width: 55%; } /* 開獎號碼 */

.marksix-history-table td {
    padding: 0;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    text-align: center;
    height: 60px; /* 固定行高 */
    line-height: 60px; /* 文字垂直置中 */
}

.marksix-history-table tr:nth-child(even) {
    background: #f9f9f9;
}

.marksix-history-table tr:hover {
    background: #f0f8ff;
}

/* 波波欄位特殊處理 */
.numbers-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap;
    height: 60px !important; /* 固定高度 */
    line-height: normal; /* 重置 line-height */
    padding: 0 10px !important;
}

/* 簡單統計樣式 */
.marksix-simple-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0;
}

.simple-stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.simple-frequency {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .marksix-container {
        margin: 10px;
        padding: 15px;
    }
    
    .marksix-app-title {
        font-size: 28px;
    }
    
    .period-date-info {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .marksix-numbers-container {
        gap: 6px;
        padding: 15px;
    }
    
    .ball-container {
        width: 50px;
        height: 50px;
    }
    
    .ball-image, .ball-fallback {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .marksix-prizes-table {
        font-size: 14px;
    }
    
    .marksix-prizes-table td {
        padding: 8px 10px;
    }
    
    .prize-name {
        width: 40%;
    }
    
    .prize-amount {
        width: 30%;
    }
    
    .prize-note {
        width: 30%;
        font-size: 12px;
    }
    
    /* 手機版表格調整 */
    .marksix-history-table td {
        height: 50px;
        line-height: 50px;
        font-size: 14px;
    }
    
    .numbers-cell {
        height: 50px !important;
        gap: 2px;
        padding: 0 5px !important;
    }
    
    .ball-container-small {
        width: 28px;
        height: 28px;
    }
    
    .ball-image-small, .ball-fallback-small {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    /* 簡單統計手機版 */
    .marksix-simple-stats {
        gap: 10px;
    }
    
    .simple-frequency {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .marksix-app-title {
        font-size: 24px;
    }
    
    .ball-container {
        width: 45px;
        height: 45px;
    }
    
    .ball-image, .ball-fallback {
        width: 45px;
        height: 45px;
        font-size: 14px;
    }
    
    .marksix-prizes-table {
        font-size: 13px;
    }
    
    .marksix-prizes-table td {
        padding: 6px 8px;
    }
    
    /* 小螢幕表格進一步調整 */
    .marksix-history-table td {
        height: 45px;
        line-height: 45px;
        font-size: 12px;
    }
    
    .numbers-cell {
        height: 45px !important;
        gap: 1px;
        padding: 0 3px !important;
    }
    
    .ball-container-small {
        width: 24px;
        height: 24px;
    }
    
    .ball-image-small, .ball-fallback-small {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .plus-small {
        font-size: 12px;
        margin: 0 2px;
    }
    
    /* 簡單統計小螢幕版 */
    .marksix-simple-stats {
        gap: 8px;
    }
    
    .simple-frequency {
        font-size: 10px;
    }
}

/* 錯誤訊息 */
.marksix-error {
    color: #d32f2f;
    background: #ffebee;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #d32f2f;
    margin: 10px 0;
}
