/* =====================================================
   SATTA MATKA CHART - MAIN STYLESHEET
   Mobile-First Responsive Design
   ===================================================== */

/* ===== CSS Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Arial', 'Helvetica', sans-serif;
    background: #000000;
    background-attachment: fixed;
    min-height: 100vh;
    padding: 0.25rem;
    color: #111111;
    line-height: 1.6;
}

/* ===== Container ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: transparent;
    overflow: visible;
}

/* ===== Marquee Section ===== */
.marquee-container {
    background: transparent;
    padding: 3px 0;
    margin: 0 0 0.15rem 0;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.marquee-container marquee {
    font-size: 0.625rem;
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: 0.02rem;
}

/* ===== Header Section ===== */
.header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 1.5rem 1rem;
    text-align: center;
    position: relative;
    margin: 0 2px 0.25rem 2px;
    border-radius: 0.625rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.15), 
                0 0 30px rgba(255, 0, 128, 0.1);
}

.header h1 {
    font-size: 4.5rem;
    font-weight: 900;
    background: linear-gradient(90deg, 
        #ff0080 0%, 
        #ff8c00 15%, 
        #40e0d0 30%, 
        #7b68ee 45%, 
        #ff1493 60%, 
        #ffd700 75%, 
        #00ff7f 90%, 
        #ff0080 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 0.3rem;
    margin-bottom: 0.5rem;
    animation: fadeInDown 0.6s ease, rainbowShift 4s ease-in-out infinite, textFloat 3s ease-in-out infinite;
    font-family: 'Bebas Neue', 'Righteous', 'Impact', sans-serif;
    filter: drop-shadow(0 0 25px rgba(255, 0, 128, 0.6)) 
            drop-shadow(0 0 50px rgba(255, 215, 0, 0.4));
    position: relative;
    transform-origin: center;
}

.header p {
    font-size: 0.875rem;
    color: #555555;
    margin-top: 0.5rem;
    font-weight: 400;
}

/* ===== Chart Container with Horizontal Scroll ===== */
.chart-container {
    padding: 0 0 2px 0;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    position: relative;
    background: #FFFFFF;
    margin: 0 2px 0.25rem 2px;
    border-radius: 0.625rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.3);
}

/* ===== Table Header Info (SEO Title + Last Update) ===== */
.table-header-info {
    padding: 0.5rem 0.75rem 0.35rem 0.75rem;
    border-bottom: 0.0625rem solid #e5e7eb;
}

.table-header-info h2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111111;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    text-align: center;
}

.last-update {
    font-size: 0.625rem;
    color: #555555;
    font-weight: 500;
    text-align: center;
}

.refresh-text {
    display: inline;
}

/* Custom Scrollbar for Better UX */
.chart-container::-webkit-scrollbar {
    height: 0.625rem;
}

.chart-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0.3125rem;
}
/* ===== Floating Action Buttons ===== */
.refresh-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1rem;
    background: #FFFFFF;
    color: #000000;
    border: 2px solid #000000;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.refresh-btn:hover {
    background: #f8f9fa;
    transform: translateY(-0.125rem) scale(1.05);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.4);
}

.refresh-btn:active {
    transform: translateY(0) scale(0.98);
}

.payment-btn {
    position: fixed;
    bottom: 1.5rem;
    left: 1rem;
    background: #FFFFFF;
    color: #000000;
    border: 2px solid #000000;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.payment-btn:hover {
    background: #f8f9fa;
    transform: translateY(-0.125rem) scale(1.05);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.4);
}

.payment-btn:active {
    transform: translateY(0) scale(0.98);
}

/* ===== Chart Container with Horizontal Scroll ===== */
.chart-container::-webkit-scrollbar-thumb {
    background: #000000;
    border-radius: 0.3125rem;
}

.chart-container::-webkit-scrollbar-thumb:hover {
    background: #111111;
}

/* ===== Table Styles ===== */
.chart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 100%;
    background: #FFFFFF;
    border: none;
    border-radius: 0 0 0.5rem 0.5rem;
    overflow: hidden;
}

/* ===== Sticky Table Header ===== */
.chart-table thead {
    position: sticky;
    top: 0;
    z-index: 100;
}

.chart-table thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.chart-table th {
    padding: 0.6rem 0.05rem;
    font-weight: 700;
    font-size: 0.75rem;
    color: #FFFFFF;
    text-align: center;
    text-transform: uppercase;
    border: 0.0625rem solid #5a67d8;
    white-space: nowrap;
    letter-spacing: 0.02rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== Table Body ===== */
.chart-table tbody tr {
    transition: all 0.3s ease;
}

.chart-table tbody tr:hover {
    background: #e9ecef;
    transform: scale(1.005);
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.08);
}

.chart-table td {
    padding: 0.5rem 0.05rem;
    text-align: center;
    border: 0.0625rem solid #e5e7eb;
    background: #FFFFFF;
    vertical-align: middle;
    transition: background 0.3s ease;
}

/* ===== Date Column Styling ===== */
.date-cell {
    font-weight: 700;
    font-size: 0.75rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    white-space: nowrap;
    min-width: 3rem;
    color: #ffffff;
    letter-spacing: 0.01rem;
    position: sticky;
    left: 0;
    z-index: 10;
    border-right: 0.0625rem solid #f59e0b;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===== Result Cell Styling ===== */
.result-cell {
    min-width: 2.8rem;
    padding: 0.5rem 0.05rem;
    background: #ffffff;
}

.result-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    line-height: 1.5;
}

/* Result Number - inline with date */
.result-no {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111111;
    letter-spacing: 0.02rem;
}

/* Result Digit - inline with year */
.result-digit {
    font-size: 1.2rem;
    font-weight: 700;
    color: #dc2626;
    letter-spacing: 0.02rem;
}

/* Empty Cell Styling */
.empty-cell {
    color: #cbd5e1;
    font-size: 0.875rem;
    font-weight: 400;
}

/* Alternating Row Colors */
.chart-table tbody tr:nth-child(even) td {
    background: #f8f9fa;
}

.chart-table tbody tr:nth-child(odd) td {
    background: #FFFFFF;
}

/* Keep date cell gradient consistent */
.chart-table tbody tr:nth-child(even) .date-cell,
.chart-table tbody tr:nth-child(odd) .date-cell {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* ===== Payment Section ===== */
.payment-section {
    padding: 1rem 1.5rem;
    background: #FFFFFF;
    margin: 0 2px 0.5rem 2px;
    border-radius: 0.625rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.3);
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.8;
    text-align: center;
}

.payment-section h2,
.payment-section h3 {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    color: #111111;
}

.payment-section p {
    margin-bottom: 0.75rem;
    color: #333333;
}

.payment-section img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.2);
}

.payment-section button,
.payment-section .btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    margin: 0.5rem 0.5rem 0.5rem 0;
    background: #000000;
    color: #FFFFFF;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.payment-section button:hover,
.payment-section .btn:hover {
    background: #111111;
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.3);
}

/* ===== Footer Section ===== */
.footer {
    padding: 1.25rem 1rem;
    text-align: center;
    background: #FFFFFF;
    font-size: 0.75rem;
    color: #555555;
    margin: 0 2px 0.5rem 2px;
    border-radius: 0.625rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.3);
}

.footer p {
    margin: 0.3125rem 0;
}

.footer a {
    color: #111111;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #000000;
    text-decoration: underline;
}

/* ===== No Results Message ===== */
.no-results {
    padding: 60px 20px;
    text-align: center;
    font-size: 20px;
    color: #6b7280;
}

.no-results p:first-child {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #374151;
}

/* ===== Animations ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    25% {
        transform: translateY(-8px) scale(1.02);
    }
    50% {
        transform: translateY(0px) scale(1.04);
    }
    75% {
        transform: translateY(-8px) scale(1.02);
    }
}

@keyframes rainbowShift {
    0% {
        background-position: 0% 50%;
        filter: drop-shadow(0 0 25px rgba(255, 0, 128, 0.8)) 
                drop-shadow(0 0 50px rgba(255, 0, 128, 0.5)) 
                drop-shadow(0 0 80px rgba(255, 0, 128, 0.3));
    }
    20% {
        background-position: 40% 50%;
        filter: drop-shadow(0 0 25px rgba(255, 140, 0, 0.8)) 
                drop-shadow(0 0 50px rgba(255, 140, 0, 0.5)) 
                drop-shadow(0 0 80px rgba(255, 140, 0, 0.3));
    }
    40% {
        background-position: 80% 50%;
        filter: drop-shadow(0 0 25px rgba(64, 224, 208, 0.8)) 
                drop-shadow(0 0 50px rgba(64, 224, 208, 0.5)) 
                drop-shadow(0 0 80px rgba(64, 224, 208, 0.3));
    }
    60% {
        background-position: 120% 50%;
        filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.8)) 
                drop-shadow(0 0 50px rgba(255, 215, 0, 0.5)) 
                drop-shadow(0 0 80px rgba(255, 215, 0, 0.3));
    }
    80% {
        background-position: 160% 50%;
        filter: drop-shadow(0 0 25px rgba(0, 255, 127, 0.8)) 
                drop-shadow(0 0 50px rgba(0, 255, 127, 0.5)) 
                drop-shadow(0 0 80px rgba(0, 255, 127, 0.3));
    }
    100% {
        background-position: 200% 50%;
        filter: drop-shadow(0 0 25px rgba(255, 0, 128, 0.8)) 
                drop-shadow(0 0 50px rgba(255, 0, 128, 0.5)) 
                drop-shadow(0 0 80px rgba(255, 0, 128, 0.3));
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ===== Responsive Design - Tablet ===== */
@media (max-width: 992px) {
    .container {
        border-radius: 0.625rem;
    }
    
    .header h1 {
        font-size: 3.5rem;
    }
    
    .chart-table {
        min-width: 100%;
    }
    
    .chart-table th {
        font-size: 0.7rem;
        padding: 0.5rem 0.05rem;
    }
    
    .result-no {
        font-size: 1rem;
    }
    
    .result-digit {
        font-size: 1.1rem;
    }
}

/* ===== Responsive Design - Mobile (Landscape) ===== */
@media (max-width: 768px) {
    body {
        padding: 2px;
    }
    
    .container {
        border-radius: 6px;
    }
    
    .header {
        padding: 8px 6px;
        margin: 0 1px 0.15rem 1px;
    }
    
    .header h1 {
        font-size: 28px;
        letter-spacing: 1px;
        margin-bottom: 0.25rem;
    }
    
    .header p {
        font-size: 9px;
        margin-top: 0.25rem;
    }
    
    .refresh-info {
        font-size: 8px;
        padding: 4px;
    }
    
    .chart-container {
        padding: 4px 2px;
        margin: 0 1px 0.15rem 1px;
    }
    
    .chart-table {
        min-width: 100%;
        border: 1px solid #000;
    }
    
    .chart-table th {
        padding: 5px 0.5px;
        font-size: 8.5px;
    }
    
    .chart-table td {
        padding: 4px 0.5px;
    }
    
    .date-cell {
        font-size: 8.5px;
        min-width: 42px;
    }
    
    .result-cell {
        min-width: 38px;
    }
    
    .result-no {
        font-size: 12px;
        margin-bottom: 1px;
    }
    
    .result-digit {
        font-size: 13px;
    }
    
    .footer {
        padding: 8px 6px;
        font-size: 8px;
        margin: 0 1px 0.15rem 1px;
    }
    
    .refresh-text {
        display: block;
        margin-top: 0.25rem;
    }
}

/* ===== Responsive Design - Mobile (Portrait) ===== */
@media (max-width: 480px) {
    body {
        padding: 0.06rem;
    }
    
    .header {
        padding: 0.4rem 0.3rem;
        margin: 0 1px 0.1rem 1px;
    }
    
    .header h1 {
        font-size: 1.8rem;
        margin-bottom: 0.15rem;
        letter-spacing: 0.12rem;
    }
    
    .header p {
        font-size: 0.5rem;
        margin-top: 0.15rem;
    }
    
    .refresh-info {
        font-size: 0.45rem;
        padding: 0.2rem;
    }
    
    .chart-container {
        padding: 0.2rem 0.06rem;
        margin: 0 1px 0.1rem 1px;
    }
    
    .chart-table {
        min-width: 100%;
    }
    
    .chart-table th {
        padding: 0.25rem 0.01rem;
        font-size: 0.42rem;
        letter-spacing: 0rem;
    }
    
    .chart-table td {
        padding: 0.2rem 0.01rem;
    }
    
    .date-cell {
        font-size: 0.42rem;
        min-width: 2.1rem;
        line-height: 1.2;
    }
    
    .result-cell {
        min-width: 1.9rem;
    }
    
    .result-no {
        font-size: 0.58rem;
        margin-bottom: 0.03rem;
    }
    
    .result-digit {
        font-size: 0.65rem;
    }
    
    .footer {
        padding: 0.4rem 0.25rem;
        font-size: 0.45rem;
        margin: 0 1px 0.1rem 1px;
    }
    
    .refresh-text {
        display: block;
        margin-top: 0.25rem;
    }
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.font-bold {
    font-weight: 700;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

/* ===== Print Styles ===== */
@media print {
    body {
        background: #fff;
        padding: 0;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .refresh-info,
    .footer a {
        display: none;
    }
    
    .chart-table {
        border: 1px solid #000;
    }
    
    .chart-table thead {
        position: static;
    }
}
