/* static/css/index.css - Main Home & Round Detail Page Specific Styles */

/* Header section with navigation */
header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.logo-area {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.logo-area span {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #fbbf24;
    text-transform: uppercase;
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

.draw-date {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

/* Navigation Controls */
.nav-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 44px; /* Mobile tap target size optimization */
}

.nav-btn:hover:not(.disabled) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.select-wrapper {
    position: relative;
}

.round-select {
    appearance: none;
    -webkit-appearance: none;
    background: #111827;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 2rem 0.5rem 1rem;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
    min-height: 44px; /* Mobile tap target size optimization */
}

.round-select:focus {
    border-color: #6366f1;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-top-color: var(--text-secondary);
    pointer-events: none;
}

/* Hero Area: Lotto Balls Display */
.hero-section {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(17, 24, 39, 0.4) 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    text-align: center;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.seo-image-container {
    max-width: 580px;
    margin: 0 auto 1.5rem auto;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    aspect-ratio: 1200 / 630;
    background: #111827;
}

.seo-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
}

.balls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.lotto-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    box-shadow: inset -3px -3px 6px rgba(0,0,0,0.45), 0 4px 8px rgba(0,0,0,0.3);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
    position: relative;
}

.bonus-separator {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 44px;
}

.bonus-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fbbf24;
    text-transform: uppercase;
    display: block;
    margin-top: 0.5rem;
}

/* Payout Summary Table */
.prize-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #a5b4fc;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.prize-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 500px; /* Prevents squishing on narrow layouts while keeping scrollable */
}

.prize-table th, .prize-table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.prize-table th {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.prize-table td {
    font-size: 0.9rem;
}

.rank-label {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.rank-label.gold-text { color: #fbbf24; }
.rank-label.silver-text { color: #cbd5e1; }

.prize-money {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #f3f4f6;
}

.criteria-text {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* Highlight Section: Gemini Summary */
.gemini-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.05);
}

.gemini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.gemini-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #818cf8;
}

.gemini-icon {
    width: 18px;
    height: 18px;
    color: #818cf8;
}

.gemini-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.ai-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.gemini-body {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #cbd5e1;
    font-weight: 400;
}

/* Search & Filter Controls */
.controls-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 18px;
    height: 18px;
}

.search-input {
    width: 100%;
    background: #111827;
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    min-height: 48px; /* Touch target */
}

.search-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.filter-buttons {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

.btn-filter {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 44px; /* Mobile tap target size optimization */
}

.btn-filter:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.btn-filter.active {
    background: var(--accent-purple-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Stores Grid & Cards - optimized minimum width to 290px for narrow mobile views */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.store-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.25rem;
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glimmer borders for elite stores */
.store-card.crown-glow {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.05);
}
.store-card.crown-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gold-gradient);
}

.store-card.fire-glow {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.03);
}
.store-card.fire-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
}

.store-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(99, 102, 241, 0.05);
}

.store-card.crown-glow:hover {
    border-color: rgba(251, 191, 36, 0.7);
}

.store-card.fire-glow:hover {
    border-color: rgba(239, 68, 68, 0.6);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.store-index-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.badge-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.buy-type-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.type-auto { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.type-manual { background: rgba(129, 140, 248, 0.15); color: #a5b4fc; border: 1px solid rgba(129, 140, 248, 0.2); }
.type-semi { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }

.history-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.history-badge i {
    width: 12px;
    height: 12px;
}

.badge-legendary { background: rgba(251, 191, 36, 0.1); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.2); }
.badge-top { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-normal { background: rgba(255, 255, 255, 0.03); color: var(--text-secondary); border: 1px solid var(--border-color); }

.store-main-info {
    margin-bottom: 1rem;
}

.store-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.store-address {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.5;
    min-height: 2.64rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Special Highlights Content integration */
.trend-snippet-box {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 0.85rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.trend-snippet-header {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.trend-snippet-content {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.trend-snippet-content strong {
    color: #fff;
}

.scroll-highlight {
    background: linear-gradient(120deg, rgba(230,81,0,0.15) 0%, rgba(230,81,0,0.05) 100%);
    border-left: 2px solid #e65100;
    padding-left: 4px;
}

/* Card Action Buttons */
.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-action {
    flex: 1;
    padding: 0.7rem 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-family: var(--font-family);
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    min-height: 44px; /* Mobile tap target size optimization */
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-action.primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

.btn-action.primary:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(59, 130, 246, 0.3) 100%);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

/* FAQ Section with Accordion CSS - Default Open */
.faq-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.faq-item {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.open {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.03);
    background: rgba(255, 255, 255, 0.02);
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 1.1rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-family);
    min-height: 48px;
}

.faq-question span {
    line-height: 1.4;
}

.faq-icon {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
    color: #818cf8;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.1rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Default Open styles - all accordions start fully open */
.faq-item.open .faq-answer {
    max-height: 500px; /* large height buffer for text */
    padding: 0 1.1rem 1.1rem 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.faq-answer strong {
    color: #fff;
}

.faq-answer span.highlight-tag {
    color: #fbbf24;
    font-weight: 600;
}

/* Ad Zone Placeholder */
.ad-container {
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.mock-ad {
    max-width: 728px;
    margin: 0 auto;
}

.ad-tag {
    font-size: 0.65rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.mock-ad p {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.ad-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Footer */
footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 4px;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #10b981;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    transform: translateY(150%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.toast.show {
    transform: translateY(0);
}

/* Responsive styling & layout adjustments */
@media (min-width: 640px) {
    .controls-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .search-wrapper {
        flex: 1;
    }
    .filter-buttons {
        width: auto;
        padding-bottom: 0;
    }
    .container {
        padding: 2.5rem 1.5rem;
    }
    h1 {
        font-size: 2.4rem;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 1.8rem;
    }
    .hero-section {
        padding: 1.5rem 0.5rem;
    }
    .lotto-ball {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    .bonus-separator {
        width: 18px;
        height: 38px;
        font-size: 1.2rem;
    }
    .prize-table-card, .gemini-card, .faq-section {
        padding: 1rem;
        border-radius: 16px;
    }
    .faq-question {
        font-size: 0.88rem;
        padding: 0.9rem;
    }
    .faq-item.open .faq-answer {
        padding: 0 0.9rem 0.9rem 0.9rem;
    }
}
