/* ==========================================================================
   Home (welcome) page — modern refresh
   Loaded AFTER mysite.css, scoped so the rest of the site is untouched.
   ========================================================================== */

/* --- Hero bar: "Main Markets · Live Results" --- */
.home-hero {
    background: linear-gradient(135deg, #1a2332 0%, #212f3c 60%, #2c3c50 100%);
    color: #ffffff;
    border-radius: 14px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 6px 18px rgba(33, 47, 60, 0.3);
    margin-bottom: 6px;
}

.home-hero h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.home-hero .hero-subtitle {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
    letter-spacing: 0.3px;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #e50202;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 3px 8px rgba(229, 2, 2, 0.4);
}

.live-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.3; transform: scale(0.75); }
}

/* --- Market result cards --- */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.market-card {
    /* force a clean white card regardless of the legacy bg-* rules */
    background-color: #ffffff !important;
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    padding: 14px 16px;
    position: relative;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.07);
    overflow: hidden;
}

.market-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #94a3b8;
}

.market-card.bg-yellow::before { background: #f59e0b; }
.market-card.bg-blue::before   { background: #3b82f6; }
.market-card.bg-pink::before   { background: #ec4899; }
.market-card.bg-red::before    { background: #ef4444; }
.market-card.bg-green::before  { background: #22c55e; }
.market-card.bg-white::before  { background: #94a3b8; }
.market-card.bg_color::before  { background: #94a3b8; }

.market-card .mc-name {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    color: #212f3c;
    margin: 0 0 2px;
    letter-spacing: 0.3px;
}

.market-card .mc-result {
    font-size: 26px;
    font-weight: 800;
    color: #e50202;
    line-height: 1.15;
    margin: 6px 0 8px;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.market-card .mc-result.is-pending {
    color: #9ca3af;
    font-weight: 600;
}

.market-card .mc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.market-card .mc-time {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

.market-card .mc-status {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.market-card .mc-status.ok {
    background: #dcfce7;
    color: #15803d;
}

.market-card .mc-status.wait {
    background: #f3f4f6;
    color: #6b7280;
}

/* --- Generic content sections (starline / chart links / old results) --- */
.home-section {
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
    padding: 0 16px 16px;
    margin-top: 18px;
    overflow: hidden;
}

.home-section h2 {
    font-size: 19px;
    font-weight: 800;
    text-transform: uppercase;
    color: #212f3c;
    margin: 18px 0 10px;
    letter-spacing: 0.3px;
}

/* The "!! Main Market Penal Chart !!" heading carries an inline-style +
   legacy bgnew/container classes — override to a full-width header bar. */
.home-section h4.bgnew,
.home-section .bgnew {
    background: linear-gradient(90deg, #1a2332, #212f3c) !important;
    color: #ffffff !important;
    padding: 14px 16px !important;
    margin: 0 -16px 14px !important;
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-radius: 14px 14px 0 0;
}

/* Tables inside sections: contained, rounded, easy to scan */
.home-section table,
.home-section .table {
    margin: 8px 0 12px;
    border-radius: 10px;
    border-collapse: separate;
    overflow: hidden;
    font-size: 13px;
}

.home-section .button {
    border: none !important;
    box-shadow: 0 3px 10px rgba(33, 47, 60, 0.18);
}

/* --- FAQ --- */
.faq {
    border: none !important;
    width: 100% !important;
    margin-top: 18px;
}

.faq-titlebar {
    background: linear-gradient(135deg, #1a2332 0%, #212f3c 60%, #2c3c50 100%);
    color: #ffffff;
    border-radius: 14px;
    padding: 16px 22px;
    font-size: 19px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 18px rgba(33, 47, 60, 0.3);
    text-align: center;
}

.faq-card {
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    margin: 0 0 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.05);
}

.faq-card.aabbcc {
    margin-top: 14px;
}

.faq-card label {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: #f4f6fa;
    color: #212f3c;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 16px !important;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.faq-card label::after {
    content: '+';
    font-size: 22px;
    font-weight: 700;
    color: #e50202;
    line-height: 1;
    transition: transform 0.2s ease;
}

.faq-card input:checked + label {
    background: #212f3c;
    color: #ffffff;
}

.faq-card input:checked + label::after {
    transform: rotate(45deg);
    color: #ffffff;
}

.faq-card .card-body p {
    padding: 14px 18px !important;
    font-size: 13px;
    line-height: 1.55;
    color: #374151;
    text-transform: none;
    letter-spacing: 0.1px;
}

/* --- Mobile tweaks --- */
@media (max-width: 500px) {
    .home-hero { padding: 14px 16px; }
    .home-hero h2 { font-size: 17px; }
    .market-card .mc-result { font-size: 22px; }
}