/* FF Result Table - Today's Table */
.ffresult {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 15px 0;
}

.ffresult table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
}

.ffresult th {
  background: #2c3e50;
  color: #ffffff;
  padding: 12px 8px;
  font-size: clamp(14px, 3.5vw, 18px);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  position: relative;
}

/* LIVE indicator - LARGER TEXT */
.ffresult th.show-live::before {
  content: "● LIVE";
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px; /* Increased from 14px */
  font-weight: bold;
  color: #ff6b6b;
  animation: pulse-live-visible 2s ease-in-out infinite;
}

@keyframes pulse-live-visible {
  0%, 100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.4;
    transform: translateY(-50%) scale(0.95);
  }
}

/* Number row - second row */
.ffresult tr:first-child + tr td {
  background: #2c3e50;
  color: #ffffff;
  font-weight: bold;
  padding: 10px 5px;
  text-align: center;
  font-size: clamp(13px, 3.2vw, 16px);
  white-space: nowrap;
  border-bottom: 3px solid #df3131;
}

/* 3-digit result row - third row */
.ffresult tr:nth-child(3) td {
  background: #ffffff;
  color: #000000;
  padding: 10px 5px;
  text-align: center;
  border: 1px solid #dee2e6;
  font-size: clamp(14px, 3.5vw, 17px);
  font-weight: 600;
  white-space: nowrap;
}

/* 1-digit result row - fourth row - YELLOWISH BACKGROUND */
.ffresult tr:nth-child(4) td {
  background: #fff9e6;
  color: #000000;
  padding: 10px 5px;
  text-align: center;
  border: 1px solid #dee2e6;
  font-size: clamp(14px, 3.5vw, 17px);
  font-weight: 600;
  white-space: nowrap;
}

.ffresult td {
  min-width: 40px;
}

.ffresult td a {
  color: #df3131;
  text-decoration: none;
  font-weight: bold;
  padding: 4px 8px;
  background: rgba(223,49,49,0.1);
  border-radius: 5px;
  font-size: clamp(12px, 3vw, 15px);
  display: inline-block;
}

.ffresult td a:hover {
  background: #df3131;
  color: #fff;
}

@media (max-width: 768px) {
  .ffresult th {
    padding: 10px 4px;
    font-size: 14px;
    letter-spacing: 0;
  }
  
  .ffresult th.show-live::before {
    font-size: 14px; /* Larger on tablet */
    left: 8px;
  }
  
  .ffresult tr:first-child + tr td {
    padding: 8px 3px;
    font-size: 13px;
    border-bottom: 2px solid #df3131;
  }
  
  .ffresult tr:nth-child(3) td {
    padding: 8px 3px;
    font-size: 14px;
  }
  
  .ffresult tr:nth-child(4) td {
    background: #fff9e6;
    padding: 8px 3px;
    font-size: 14px;
  }
  
  .ffresult td {
    min-width: 35px;
  }
  
  .ffresult td a {
    padding: 3px 6px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .ffresult th {
    padding: 8px 2px;
    font-size: 12px;
  }
  
  .ffresult th.show-live::before {
    font-size: 12px; /* Larger on mobile */
    left: 5px;
  }
  
  .ffresult tr:first-child + tr td {
    padding: 6px 2px;
    font-size: 12px;
    border-bottom: 2px solid #df3131;
  }
  
  .ffresult tr:nth-child(3) td {
    padding: 6px 2px;
    font-size: 13px;
  }
  
  .ffresult tr:nth-child(4) td {
    background: #fff9e6;
    padding: 6px 2px;
    font-size: 13px;
  }
  
  .ffresult td {
    min-width: 30px;
  }
  
  .ffresult td a {
    padding: 2px 5px;
    font-size: 11px;
  }
}

/* Historical Results Table - NO NUMBER ROW */
.history-table {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 15px 0;
}

.history-table table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
}

.history-table th {
  background: #2c3e50;
  color: #ffffff;
  padding: 12px 8px;
  font-size: clamp(14px, 3.5vw, 18px);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border-bottom: 3px solid #8b0000;
}

/* 3-digit result row - second row in history */
.history-table tr:nth-child(2) td {
  background: #ffffff;
  color: #000000;
  padding: 10px 5px;
  text-align: center;
  border: 1px solid #dee2e6;
  font-size: clamp(14px, 3.5vw, 17px);
  font-weight: 600;
  white-space: nowrap;
}

/* 1-digit result row - third row in history - YELLOWISH BACKGROUND */
.history-table tr:nth-child(3) td {
  background: #fff9e6;
  color: #000000;
  padding: 10px 5px;
  text-align: center;
  border: 1px solid #dee2e6;
  font-size: clamp(14px, 3.5vw, 17px);
  font-weight: 600;
  white-space: nowrap;
}

.history-table td {
  min-width: 40px;
}

@media (max-width: 768px) {
  .history-table th {
    padding: 10px 4px;
    font-size: 14px;
    letter-spacing: 0;
    border-bottom: 2px solid #8b0000;
  }
  
  .history-table tr:nth-child(2) td {
    padding: 8px 3px;
    font-size: 14px;
  }
  
  .history-table tr:nth-child(3) td {
    background: #fff9e6;
    padding: 8px 3px;
    font-size: 14px;
  }
  
  .history-table td {
    min-width: 35px;
  }
}

@media (max-width: 480px) {
  .history-table th {
    padding: 8px 2px;
    font-size: 12px;
    border-bottom: 2px solid #8b0000;
  }
  
  .history-table tr:nth-child(2) td {
    padding: 6px 2px;
    font-size: 13px;
  }
  
  .history-table tr:nth-child(3) td {
    background: #fff9e6;
    padding: 6px 2px;
    font-size: 13px;
  }
  
  .history-table td {
    min-width: 30px;
  }
}

/* History Container */
.ffkar-history-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.ffkar-history-container h3 {
  text-align: center;
  color: #333;
  margin-bottom: 30px;
  font-size: 24px;
  font-weight: bold;
}

@media (max-width: 768px) {
  .ffkar-history-container {
    padding: 10px;
  }
  
  .ffkar-history-container h3 {
    font-size: 20px;
    margin-bottom: 20px;
  }
}

/* Tips Table - REDESIGNED WITH SLATE BLACK HEADER */
.tips_table {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 15px 0;
}

.tips_table table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
}

.tips_table thead th {
  background: #2c3e50;
  color: white;
  padding: 15px;
  font-size: 18px;
  font-weight: bold;
}

.tips_table tbody tr:nth-child(odd) {
  background: #f9f9f9;
}

.tips_table tbody tr:nth-child(even) {
  background: #ffffff;
}

.tips_table tbody td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: center;
  font-size: 15px;
}

.tips_table tbody td.tips-bazi {
  font-weight: 600;
  text-align: left;
  padding-left: 15px;
  width: 30%;
  color: #2c3e50;
}

.tips_table tbody td.tips-numbers {
  font-weight: 600;
  color: #000;
  width: 50%;
}

.tips_table tbody td.tips-status {
  font-size: 20px;
  width: 20%;
}

.tips_table .tips-match {
  color: #4CAF50;
  font-size: 24px;
}

.tips_table .tips-no-match {
  color: #f44336;
  font-size: 24px;
}

.tips_table tfoot td {
  background: #2c3e50;
  color: white;
  text-align: center;
  padding: 10px;
  font-weight: 500;
  font-size: 14px;
}

@media (max-width: 768px) {
  .tips_table thead th {
    padding: 12px 8px;
    font-size: 16px;
  }
  
  .tips_table tbody td {
    padding: 10px 8px;
    font-size: 14px;
  }
  
  .tips_table tbody td.tips-bazi {
    width: 35%;
  }
  
  .tips_table tbody td.tips-numbers {
    width: 45%;
  }
  
  .tips_table tbody td.tips-status {
    width: 20%;
    font-size: 18px;
  }
  
  .tips_table tfoot td {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .tips_table thead th {
    padding: 10px 5px;
    font-size: 14px;
  }
  
  .tips_table tbody td {
    padding: 8px 5px;
    font-size: 13px;
  }
  
  .tips_table tbody td.tips-bazi {
    padding-left: 8px;
    width: 30%;
  }
  
  .tips_table tbody td.tips-numbers {
    width: 50%;
  }
  
  .tips_table tbody td.tips-status {
    width: 20%;
    font-size: 16px;
  }
  
  .tips_table tfoot td {
    font-size: 12px;
  }
}



/* Custom Message */
.ffkar-custom-message {
  background: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 5px;
  padding: 15px;
  text-align: center;
  font-weight: 600;
  margin: 20px 0;
  color: #856404;
}

@media (max-width: 480px) {
  .ffkar-custom-message {
    padding: 12px;
    font-size: 14px;
  }
}


/* Month Heading for Year Archive */
.ffkar-history-container .month-heading {
  text-align: center;
  color: #2c3e50;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 40px 0 20px 0;
  font-size: 28px;
  font-weight: bold;
  padding: 10px 0;
  border-bottom: 3px solid #667eea;
}

@media (max-width: 768px) {
  .ffkar-history-container .month-heading {
    font-size: 24px;
    margin: 30px 0 15px 0;
  }
}

@media (max-width: 480px) {
  .ffkar-history-container .month-heading {
    font-size: 20px;
    margin: 25px 0 12px 0;
  }
}

/* ========================================
   RESULT BY DATE - Date Picker Form
   ======================================== */
.ffkar-date-picker-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
}

.ffkar-date-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.ffkar-date-input-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.ffkar-date-input-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.ffkar-date-input-group input[type="date"] {
    padding: 10px 15px;
    font-size: 16px;
    border: 2px solid #2c3e50;
    border-radius: 8px;
    background: #ffffff;
    color: #2c3e50;
    cursor: pointer;
    min-width: 180px;
}

.ffkar-date-input-group input[type="date"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.ffkar-check-btn {
    padding: 10px 25px;
    font-size: 16px;
    font-weight: 600;
    background: #2c3e50;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ffkar-check-btn:hover {
    background: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ffkar-check-btn:active {
    transform: translateY(0);
}

.ffkar-date-result {
    margin-top: 20px;
}

.ffkar-no-result {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #856404;
}

.ffkar-no-result p {
    margin: 5px 0;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .ffkar-date-picker-container {
        padding: 10px;
    }
    
    .ffkar-date-form {
        padding: 15px;
    }
    
    .ffkar-date-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .ffkar-date-input-group input[type="date"] {
        width: 100%;
        min-width: unset;
    }
    
    .ffkar-check-btn {
        width: 100%;
    }
}