/* assets/css/style.css */

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
}

/* Header Tabs */
.header-tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    cursor: pointer;
    background: #fff;
    color: #333;
    border-bottom: 2px solid transparent;
}

.tab-item.active {
    background: #00b96b;
    /* Green from screenshot */
    color: #fff;
    border-bottom-color: #00b96b;
}

.tab-name {
    font-size: 18px;
    font-weight: bold;
}

.tab-date {
    font-size: 12px;
    margin-top: 2px;
}

/* Main Content */
.main-content {
    padding: 15px;
}

.period-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.countdown-label {
    color: #e02020;
    font-weight: bold;
}

.history-link {
    color: #00b96b;
    text-decoration: none;
    font-size: 14px;
    align-items: center;
    flex-shrink: 0;
    /* 防止压缩 */
}

/* Lottery Balls */
.balls-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-evenly;
    gap: 2px;
    padding: 10px 0;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.ball-wrapper {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.ball {
    /* 使用 clamp 实现自适应大小：最小35px，理想10vw，最大55px */
    width: clamp(35px, 10vw, 55px);
    height: clamp(35px, 10vw, 55px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* 字体大小也自适应 */
    font-size: clamp(14px, 4vw, 22px);
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2), inset 0 -3px 8px rgba(0, 0, 0, 0.15), inset 0 3px 8px rgba(255, 255, 255, 0.3);
}

/* 红波 - 红色渐变球 */
.ball.red {
    background: linear-gradient(145deg, #ff6b6b, #e53935);
    border: 2px solid #c62828;
}

/* 蓝波 - 蓝色渐变球 */
.ball.blue {
    background: linear-gradient(145deg, #64b5f6, #1e88e5);
    border: 2px solid #1565c0;
}

/* 绿波 - 绿色渐变球 */
.ball.green {
    background: linear-gradient(145deg, #81c784, #43a047);
    border: 2px solid #2e7d32;
}

.ball-info {
    font-size: clamp(10px, 2.5vw, 12px);
    /* 自适应标签字体 */
    color: #888;
    white-space: nowrap;
}

.plus-sign {
    font-size: clamp(16px, 4vw, 24px);
    /* 自适应加号大小 */
    color: #ccc;
    margin: 0 clamp(2px, 1vw, 5px);
    padding-bottom: 15px;
    flex-shrink: 0;
}

/* Footer */
.result-footer {
    text-align: center;
    color: #e02020;
    font-size: 14px;
    margin-top: 15px;
    font-weight: bold;
}


/* Prediction List */
.predictions-section {
    padding: 10px 15px;
    background: #fff;
    margin-top: 10px;
}

.pred-item {
    border: 1px solid #333;
    border-radius: 20px;
    padding: 8px 10px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pred-text {
    display: inline-block;
}

.color-blue {
    color: #1e90ff;
}

.color-red {
    color: red;
}

.color-purple {
    color: #9c27b0;
}

.font-bold {
    font-weight: bold;
}

.bg-yellow {
    background-color: #ffeb3b;
    padding: 0 2px;
}

.pred-title-group {
    margin: 0 4px;
}

.pred-title {
    color: #000;
}

/* Prediction Separator and Rules */
.section-separator {
    height: 60px;
    /* Adjust based on image aspect ratio? Screenshot looks banner-like */
    background-image: url('../img/title-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-top: 10px;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15%;
    /* Push text to sides, adjust percentage as needed */
    box-sizing: border-box;
    /* Ensure padding doesn't increase width */
}

span.sep-text.right {
    position: absolute;
    right: 12%;
}

span.sep-text.left {
    position: absolute;
    left: 13%;
}

.sep-text {
    color: #ffd700;
    /* Gold/Yellow */
    font-weight: bold;
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Use flex distribution above, or absolute if specific pos needed
   Screenshot shows them spaced out. space-around or space-between with padding works.
*/


.prediction-rules {
    display: flex;
    justify-content: space-between;
    padding: 10px 5px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #ddd;
    margin-bottom: 10px;
}

.color-blue-bold {
    /* Standard Bootstrap blue or similar */
    font-weight: bold;
}

/* Reference Images */
.reference-section {
    padding: 10px;
    text-align: center;
    background: #fff;
    margin-top: 10px;
}

.ref-img {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Site Footer */
.site-footer {
    padding: 20px 15px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin-top: 20px;
    color: #6c757d;
    font-size: 12px;
}

.site-footer p {
    margin: 5px 0;
}

/* --- Prediction Table (七尾中特 etc.) --- */
.pred-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pred-table thead th {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
    padding: 10px 12px;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    border: 1px solid #ef6c00;
}

.pred-table tbody td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.pred-table tbody tr:hover {
    background: #f9f9f9;
}

/* --- Popup Overlay --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
}

.popup-container {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-header {
    background: #00b96b;
    /* Green */
    color: #fff;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
}

.popup-close {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.popup-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    background: #fff;
    /* Ensure bg is white, but maybe user wants inner yellow box? */
}

/* User's screenshot shows an inner yellow box style for the content */
.popup-content-box {
    background: #ffecb3;
    /* Light Orange/Yellow */
    border: 2px solid #ffcc80;
    border-radius: 8px;
    padding: 15px;
    color: #333;
    font-weight: bold;
    margin-bottom: 15px;
}

/* --- Floating Buttons --- */
.floating-buttons {
    position: fixed;
    bottom: 80px;
    /* Above footer/nav */
    right: 20px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.float-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
}

.float-btn:active {
    transform: scale(0.95);
}

.btn-top {
    background: #00b96b;
    /* Green */
}

.btn-popup {
    background: #7986cb;
    /* Purple/Blue */
    font-size: 18px;
}