/* ===================================
   TODAY'S RESULT SECTION
   =================================== */
.kff-today-only {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    background: #fffde7;
    /* light yellow */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.kff-date-today {
    margin: 0;
    padding: 15px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    background: #dc2626;
    /* red */
    color: white;
    letter-spacing: 0.8px;
}

/* ===================================
   RESULT TABLE - Clean & Minimal
   =================================== */
.kff-result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    background: white;
}

/* Table Header - Red */
.kff-result-table thead {
    background: #dc2626;
}

.kff-result-table th {
    color: white;
    padding: 12px 8px;
    font-weight: 700;
    font-size: 15px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.kff-result-table th:last-child {
    border-right: none;
}

.kff-result-table th .time {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #fff9c4;
    /* light yellow tint */
    margin-top: 5px;
}

.kff-result-table th .time .delay-text {
    color: #fffde7;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 5px;
    font-weight: 600;
}

/* Table Body - Three Digit Row */
.kff-result-table .three-digit td {
    background: #fffde7;
    /* light yellow */
    color: #991b1b;
    /* dark red */
    padding: 10px 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    border-right: 1px solid #fecaca;
    border-bottom: 1px solid #fecaca;
}

.kff-result-table .three-digit td:last-child {
    border-right: none;
}

/* Table Body - Single Digit Row */
.kff-result-table .single-digit td {
    background: #fee2e2;
    /* light red */
    color: #7f1d1d;
    padding: 14px 8px;
    text-align: center;
    font-size: 18px;
    border-right: 1px solid #fecaca;
    border-bottom: 1px solid #fecaca;
}

.kff-result-table .single-digit td:last-child {
    border-right: none;
}

/* Links in Table */
.kff-result-table a {
    color: #dc2626;
    text-decoration: none;
    font-weight: 900;
}


/* ===================================
   REFRESH BUTTON - Light Yellow with Red Text
   =================================== */
.kff-refresh-btn {
    background: #fffde7;
    color: #dc2626;
    border: 2px solid #dc2626;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    margin: 20px auto;
    padding: 12px 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kff-refresh-btn.kff-loading {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===================================
   OLD RESULTS CHART SECTION
   =================================== */
.kff-recent-chart {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    background: #fffde7;
    border-radius: 12px;
}

.chart-title {
    text-align: center;
    background: #dc2626;
    color: white;
    padding: 16px;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.2);
}

/* Reason Text Styling */
.kff-reason-text {
    text-align: center;
    padding: 40px 20px;
    font-size: 22px;
    font-weight: bold;
    color: #991b1b;
    background: #fee2e2;
    border-radius: 12px;
    margin: 20px auto;
}

/* Chart Block */
.kff-chart-block {
    background: white;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #fecaca;
}

.kff-chart-block h3 {
    margin: 0;
    background: #4f3030;
    color: white;
    font-size: 17px;
    font-weight: 700;
    padding: 12px;
    display: block;
    text-align: center;
}

/* ===================================
   ANIMATIONS - Only fadeIn kept if needed
   =================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.chart-date {
    font-size: 16px;
    font-weight: 600;
    /* space before LIVE */
}

.live-text-blink {
    font-size: 16px;
    font-weight: 700;
    color: #ff6b6b;
    display: inline-block;
    vertical-align: middle;
    animation: pulse-live-visible 2s ease-in-out infinite;
}

@keyframes pulse-live-visible {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 0 0 rgba(255, 107, 107, 0);
    }

    50% {
        opacity: 0.4;
        text-shadow: 0 0 8px rgba(255, 107, 107, 0.7);
    }
}


/* Date container for today chart */
.date-live-container {
    background: #4f3030;
    padding: 12px;
    text-align: center;
    color: white;
}

.date-live-container .chart-date {
    font-size: 17px;
    font-weight: 700;
    color: white;
    margin-right: 8px;
    /* space between date and live */
}

/* Specific override for mobile to ensure they stay on same line if possible */
@media (max-width: 768px) {
    .date-live-container .chart-date {
        font-size: 16px;
        display: inline;
    }
}


.single-digit .blink-tips {
    display: inline-block;
    padding: 3px 8px;
    background: #000;
    color: #00fff0;
    text-decoration: none;
    font-weight: 600;
    font-size: 10px;
    border-radius: 3px;
    animation: proPulseTips 2.2s ease-in-out infinite;
}

@keyframes proPulseTips {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 3px rgba(0, 255, 240, 0.4);
    }

    50% {
        opacity: 0.75;
        box-shadow: 0 0 7px rgba(0, 255, 240, 0.8);
    }
}

/* ===================================
   MOBILE RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {


    .kff-date-today {
        font-size: 20px;
        padding: 12px;
    }

    .kff-result-table th {
        font-size: 13px;
        padding: 10px 4px;
    }

    .kff-result-table th .time {
        font-size: 7px;
    }

    .kff-result-table .three-digit td {
        font-size: 13px;
        padding: 8px 4px;
    }

    .kff-result-table .single-digit td {
        font-size: 16px;
        padding: 12px 4px;
    }

    .kff-refresh-btn {
        padding: 10px 25px;
        font-size: 15px;
    }

    .chart-title {
        font-size: 20px;
        padding: 14px;
    }

    .kff-chart-block h3 {
        font-size: 16px;
        display: block;
    }

    .kff-reason-text {
        font-size: 20px;
        padding: 30px 15px;
    }

    /* Make table scrollable on small screens */
    .kff-result-table {
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .kff-date-today {
        font-size: 18px;
    }

    .kff-result-table th {
        font-size: 12px;
        padding: 4px 2px;
    }

    .kff-result-table .three-digit td {
        font-size: 12px;
    }

    .kff-result-table .single-digit td {
        font-size: 15px;
    }

    .chart-title {
        font-size: 18px;
    }

    .kff-reason-text {
        font-size: 18px;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.kff-fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}