/*
Theme Name: Lottery Sambad Theme
Theme URI: https://yourdomain.com/lottery-sambad-theme
Author: Your Name
Author URI: https://yourdomain.com
Description: Modern professional lottery results theme optimized for mobile
Version: 4.0.0
License: GPL v2 or later
Text Domain: lottery-sambad
*/

/* Modern CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #ff6b00;
    --primary-dark: #e66000;
    --primary-light: #ff8533;
    --white: #ffffff;
    --background: #f5f7fa;
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --border: #e9ecef;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header with Menu */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-bar {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.logo-area {
    flex: 1;
}

.site-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.3px;
}

.site-title a {
    text-decoration: none;
    color: var(--primary);
}

.site-description {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Menu Button */
.menu-btn {
    background: none;
    border: none;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.menu-btn:hover {
    background: rgba(0,0,0,0.05);
}

.menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Navigation Menu */
.main-nav {
    background: var(--white);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 1px solid var(--border);
}

.main-nav.show {
    max-height: 300px;
}

.nav-menu {
    list-style: none;
    padding: 8px 0;
    max-width: 600px;
    margin: 0 auto;
}

.nav-menu li {
    border-bottom: 1px solid var(--border);
}

.nav-menu li:last-child {
    border-bottom: none;
}

.nav-menu a {
    display: block;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: background 0.2s;
}

.nav-menu a:hover,
.nav-menu a:active {
    background: rgba(255, 107, 0, 0.05);
    color: var(--primary);
}

/* Date Header */
.date-header {
    text-align: center;
    padding: 20px 0 10px;
    margin-bottom: 10px;
}

.current-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--white);
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    box-shadow: var(--shadow-sm);
}

/* Time Slot Cards */
.results-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 10px 0 20px;
}

.time-slot-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    animation: fadeInUp 0.3s ease;
}

/* Time Slot Header (Clickable Toggle) */
.time-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
}

.time-slot-header:active {
    background: rgba(0,0,0,0.02);
}

.time-slot-header.time-1pm-header {
    border-left: 4px solid #1976d2;
}

.time-slot-header.time-6pm-header {
    border-left: 4px solid #388e3c;
}

.time-slot-header.time-8pm-header {
    border-left: 4px solid #7b1fa2;
}

.time-info {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.time-label {
    font-size: 1.1rem;
    font-weight: 700;
}

.time-1pm-header .time-label {
    color: #1976d2;
}

.time-6pm-header .time-label {
    color: #388e3c;
}

.time-8pm-header .time-label {
    color: #7b1fa2;
}

.time-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Status Indicators */
.status-pending, .status-upcoming {
    display: inline-block;
    padding: 4px 10px;
    background: #ffc107;
    color: #856404;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
}

.status-available {
    display: inline-block;
    padding: 4px 10px;
    background: #28a745;
    color: white;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
}
.status-upcoming {
    background: #17a2b8;
    color: white;
}

/* Toggle Icon */
.toggle-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.toggle-icon span {
    display: block;
    width: 12px;
    height: 2px;
    background: var(--text-secondary);
    position: relative;
}

.toggle-icon span::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 2px;
    background: var(--text-secondary);
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

.time-slot-header.expanded .toggle-icon {
    transform: rotate(180deg);
}

.time-slot-header.expanded .toggle-icon span::before {
    transform: rotate(0deg);
}

/* Time Slot Content */
.time-slot-content {
    display: none;
    background: var(--white);
    border-top: 1px solid var(--border);
}

.time-slot-content.expanded {
    display: block;
}

/* Lottery Card inside toggle */
.time-slot-content .lottery-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 20px;
}

/* Lottery Loader */
.lottery-loader {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px auto;
}

.loader-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Image Container */
.image-container {
    position: relative;
    width: 100%;
    margin: 15px 0;
    cursor: pointer;
    overflow: hidden;
    background: rgba(0,0,0,0.02);
    border-radius: var(--radius-md);
}

.lottery-img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    display: block;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
}

/* Card Footer */
.card-footer {
    padding: 10px 0 0 0;
}

/* PDF Button */
.btn-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-pdf:active {
    transform: scale(0.97);
}

/* PDF Only Container */
.pdf-only-container {
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    margin: 0;
    border-radius: var(--radius-md);
}

.pdf-icon {
    margin-bottom: 16px;
    font-size: 48px;
    font-weight: 300;
    color: #dc3545;
}

.pdf-only-container .btn-pdf {
    width: auto;
    min-width: 200px;
    padding: 14px 28px;
    font-size: 1rem;
}

.pdf-only-text {
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* No Result Message */
.no-result-message {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    border-radius: var(--radius-md);
}

/* Refresh Instruction */
.refresh-instruction {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe8cc 100%);
    border-left: 4px solid var(--primary);
    padding: 16px;
    margin: 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.refresh-icon {
    font-size: 32px;
    min-width: 40px;
    text-align: center;
}

.refresh-content {
    flex: 1;
}

.refresh-title {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.refresh-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.refresh-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.refresh-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 40px;
}

.refresh-btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}

.countdown-timer {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 6px;
}

/* ========== BUMPERS SECTION - WORKING VERSION ========== */

.bumpers-section {
    margin: 40px 0;
}

/* Ribbon Header */




.bumpers-ribbon-icon {
    font-size: 1.3rem;
}

.bumpers-ribbon-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    margin: 0;
}

.bumpers-ribbon-badge {
    background: rgba(255,255,255,0.25);
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
}

/* Toggle Button Card */
.bumpers-toggle-card {
    margin: 20px 0;
}

.toggle-btn-enhanced {
    width: 100%;
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.toggle-btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.toggle-btn-enhanced:active {
    transform: scale(0.98);
}

.toggle-btn-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-btn-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: transform 0.3s ease;
    color: white;
}

.toggle-btn-enhanced:hover .toggle-btn-icon {
    transform: scale(1.1);
}

.toggle-btn-text {
    text-align: left;
}

.toggle-btn-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.toggle-btn-subtitle {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.toggle-btn-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-btn-indicator {
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.toggle-btn-enhanced.active .toggle-btn-indicator {
    background: #28a745;
}

.toggle-arrow {
    width: 32px;
    height: 32px;
    background: rgba(255, 107, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.toggle-arrow span {
    font-size: 1rem;
    color: var(--primary);
}

.toggle-btn-enhanced.active .toggle-arrow {
    transform: rotate(180deg);
    background: var(--primary);
}

.toggle-btn-enhanced.active .toggle-arrow span {
    color: white;
}

/* Bumpers Grid */
.bumpers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 20px;
}

.bumper-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.bumper-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.bumper-image-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.bumper-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bumper-card:hover .bumper-img {
    transform: scale(1.05);
}

.bumper-content {
    padding: 16px;
}

.bumper-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.bumper-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bumper-pdf-only {
    padding: 20px 16px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
}

.bumper-pdf-only .btn-pdf {
    width: auto;
    min-width: 180px;
    padding: 12px 24px;
    font-size: 0.9rem;
}

/* Load More Button */
.load-more-btn {
    width: 100%;
    padding: 14px;
    background: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.load-more-btn:active {
    background: var(--primary);
    color: white;
}

/* Search Section */
.search-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

.search-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.date-input {
    width: 100%;
    padding: 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:active {
    transform: scale(0.97);
}

/* Modal for Image */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(20px);
    cursor: pointer;
}

.modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.05s linear;
    cursor: zoom-in;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 1002;
}

.zoom-instruction {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    pointer-events: none;
    z-index: 1001;
    white-space: nowrap;
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    gap: 12px;
    color: var(--text-secondary);
}

/* Auto Refresh */
.auto-refresh-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.auto-refresh-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.auto-refresh-btn.active {
    background: #28a745;
    animation: rotate 1s linear infinite;
}

.auto-refresh-tooltip {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--white);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    display: none;
}

.auto-refresh-btn:hover .auto-refresh-tooltip {
    display: block;
}

/* Single Post Page */
.single-post-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.post-meta {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.post-content {
    line-height: 1.7;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.single-pdf-container {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    border-radius: var(--radius-md);
    margin: 20px 0;
}

.single-pdf-container .btn-pdf {
    width: auto;
    min-width: 220px;
    padding: 14px 28px;
    font-size: 1rem;
}

/* Footer */
.site-footer {
    background: var(--white);
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
    box-shadow: var(--shadow-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (min-width: 768px) {
    .container {
        max-width: 700px;
    }
    
    .bumpers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bumpers-ribbon {
        padding: 10px 18px;
    }
    
    .bumpers-ribbon-title {
        font-size: 1rem;
    }
    
    .toggle-btn-enhanced {
        padding: 12px 16px;
    }
    
    .toggle-btn-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .toggle-btn-title {
        font-size: 0.9rem;
    }
    
    .toggle-btn-subtitle {
        font-size: 0.65rem;
    }
    
    .toggle-btn-indicator {
        padding: 4px 12px;
        font-size: 0.7rem;
    }
    
    .toggle-arrow {
        width: 28px;
        height: 28px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; box-shadow: 0 2px 12px rgba(255, 107, 0, 0.2); }
}
/* Simple Bumpers Header */
.bumpers-header {
    text-align: center;
    margin-bottom: 20px;
}

.bumpers-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.bumpers-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Custom Time Slot Header */
.time-custom-header {
    border-left: 4px solid #ff6b00 !important;
    background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
}

.time-custom-header .time-label {
    color: #ff6b00 !important;
}

.custom-time-slot {
    border: 1px solid #ffe0b3;
    background: #fffaf5;
}

/* SEO Info Section Styles */
.lottery-info-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 24px;
    margin: 40px 0 20px;
    padding: 30px 20px;
}

.info-container {
    max-width: 700px;
    margin: 0 auto;
}

.info-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    text-align: center;
}

.info-description {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .lottery-info-section {
        padding: 20px 15px;
        margin: 30px 0 15px;
    }
    
    .info-title {
        font-size: 1.3rem;
    }
    
    .schedule-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}