/* ========================================
   HOW TO PLAY PAGE - Fixed CSS
   Matches actual HTML template classes
   ======================================== */

/* Scroll offset for sticky header */
html {
    scroll-padding-top: 120px;
}

/* Hero Section */
.how-to-play-hero {
    position: relative;
    padding-top: calc(6rem + 120px);
    padding-bottom: 4rem;
    margin-top: -120px;
    margin-bottom: 3rem;
    overflow: hidden;
    background: url('../images/bet-max-action-gray-background.jpg') center/cover no-repeat;
}

.how-to-play-hero .container {
    position: relative;
    z-index: 1;
}

.how-to-play-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--bma-white);
    margin-bottom: 1rem;
}

.how-to-play-hero .lead {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
}

/* Content Section */
.how-to-play-content {
    padding: 2rem 0 4rem 0;
    position: relative;
    z-index: 1;
}

.container-full {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.htp-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    position: relative;
}

/* ========================================
   SIDEBAR NAVIGATION
   ======================================== */

.htp-sidebar {
    position: sticky;
    top: 180px;
    height: fit-content;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.htp-sidebar::-webkit-scrollbar {
    width: 6px;
}

.htp-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.htp-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 230, 118, 0.3);
    border-radius: 3px;
}

.sidebar-header {
    display: none;
}

.sidebar-toggle {
    display: none; /* Hidden on desktop, visible on mobile */
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-list > li {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--bma-white);
    background: rgba(0, 230, 118, 0.1);
}

.nav-link.active {
    color: var(--bma-green-bright);
    background: rgba(0, 230, 118, 0.15);
    font-weight: 500;
}

.nav-sublist {
    list-style: none;
    padding: 0.5rem 0 0 1rem;
    margin: 0;
}

.nav-sublist li {
    margin-bottom: 0.25rem;
}

.nav-sublist .nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.badge-soon {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    background: rgba(255, 215, 0, 0.2);
    color: var(--bma-yellow);
    border-radius: 4px;
    margin-left: 0.5rem;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.htp-main {
    padding-bottom: 3rem;
}

.htp-section {
    margin-bottom: 4rem;
    padding-top: 180px;
    margin-top: -180px;
}

.htp-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bma-white);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.htp-section h2::before {
    content: '';
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    background-image: url('../images/X-v1.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.htp-section h3 {
    font-size: 1.5rem;
    color: var(--bma-white);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.htp-section h3::before {
    content: '';
    display: inline-block;
    width: 1.4em;
    height: 1.4em;
    background-image: url('../images/X-v2.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.htp-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.td-currency {
    color: var(--bma-green-bright);
    display: inline;
}

/* Quick Start */
.quick-start {
    margin-top: 2rem;
}

.steps-grid {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.step-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    gap: 0 1.25rem;
    background: rgba(30, 30, 30, 0.6);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.step-number {
    grid-row: 1 / 3;
    grid-column: 1;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-accent);
    color: var(--bma-black);
    font-size: 1.5rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.step-card h4 {
    grid-row: 1;
    grid-column: 2;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bma-white);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.step-card p {
    grid-row: 2;
    grid-column: 2;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.6;
    font-size: 1rem;
}

/* Key Concepts */
.key-concepts {
    margin-top: 2rem;
}

.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.concept-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 230, 118, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.concept-card:hover {
    border-color: rgba(0, 230, 118, 0.4);
    transform: translateY(-2px);
}

.concept-icon {
    margin-bottom: 1rem;
    color: var(--bma-green-bright);
}

.concept-card h4 {
    font-size: 1.1rem;
    color: var(--bma-green-bright);
    margin-bottom: 0.75rem;
}

.concept-card p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 0.95rem;
}

/* Mode Cards */
.mode-section {
    margin-bottom: 3rem;
    padding-top: 180px;
    margin-top: -180px;
}

.mode-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.mode-card.mode-disabled {
    opacity: 0.7;
}

.mode-visual {
    margin-bottom: 1.5rem;
}

.placeholder-graphic {
    background: rgba(0, 0, 0, 0.4);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
}

.placeholder-graphic svg {
    width: 64px;
    height: 64px;
    color: rgba(255, 255, 255, 0.3);
    margin: 0 auto 1rem auto;
}

.placeholder-graphic p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin: 0;
}

/* Tournament Screenshot Styling */
.tournament-screenshot {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    overflow: hidden;
    padding: 1rem;
}

.tournament-screenshot img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 4px;
}

.mode-content h4 {
    font-size: 1.3rem;
    color: var(--bma-white);
    margin-bottom: 1rem;
}

.mode-content ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.mode-content ul li {
    padding: 0.5rem 0 0.5rem 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
}

.mode-content ul li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bma-green-bright);
    position: absolute;
    left: 0;
    top: 1.1rem;
}

.callout {
    background: rgba(0, 230, 118, 0.05);
    border-left: 4px solid var(--bma-green-bright);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-top: 1.5rem;
}

.callout h5 {
    color: var(--bma-green-bright);
    margin-bottom: 0.5rem;
}

.callout p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.badge-coming-soon {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 215, 0, 0.2);
    color: var(--bma-yellow);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    margin-left: 0.5rem;
}

.coming-soon-note {
    font-style: italic;
    color: rgba(255, 255, 255, 0.5);
}

/* Mechanics */
.mechanic-block {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.mechanic-block h3 {
    font-size: 1.4rem;
    color: var(--bma-white);
    margin-bottom: 1rem;
}

.mechanic-block ol,
.mechanic-block ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.mechanic-block li {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.mechanic-block strong {
    color: var(--bma-white);
}

.tip-box {
    background: rgba(255, 215, 0, 0.1);
    border-left: 4px solid var(--bma-yellow);
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Scoring */
.scoring-block {
    margin-bottom: 3rem;
}

.td-explainer {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.td-visual {
    margin-bottom: 1.5rem;
}

.td-content ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.td-content ul li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
}

.td-content ul li::before {
    content: '→';
    color: var(--bma-green-bright);
    position: absolute;
    left: 0;
    top: 0.5rem;
}

.outcomes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.outcome-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
}

.outcome-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.outcome-win h4 {
    color: var(--bma-green-bright);
}

.outcome-loss h4 {
    color: var(--bma-red);
}

.outcome-push h4 {
    color: var(--bma-yellow);
}

.outcome-example {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.odds-explainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.odds-card {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
}

.odds-card h4 {
    font-size: 1.3rem;
    color: var(--bma-white);
    margin-bottom: 0.5rem;
}

.odds-example {
    font-size: 1.5rem;
    color: var(--bma-green-bright);
    margin-bottom: 1rem;
    font-weight: 600;
}

.odds-math {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-family: 'Courier New', monospace;
    line-height: 1.8;
}

.highlight {
    color: var(--bma-yellow);
    font-weight: 600;
}

/* Glossary */
.glossary-intro {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.glossary-section {
    margin-bottom: 3rem;
    padding-top: 180px;
    margin-top: -180px;
}

.glossary-accordion {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.accordion-item {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--bma-white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.accordion-header svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: var(--bma-green-bright);
}

.accordion-item.active .accordion-header svg {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
}

.accordion-item.active .accordion-content {
    max-height: 500px;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
}

.accordion-content p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.accordion-content .example {
    background: rgba(0, 230, 118, 0.05);
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 3px solid var(--bma-green-bright);
    font-size: 0.95rem;
}

.accordion-content .example strong {
    color: var(--bma-green-bright);
}

/* Sports Tabs */
.sports-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.sport-tab {
    padding: 0.75rem 1.25rem;
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sport-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--bma-white);
}

.sport-tab.active {
    background: rgba(0, 230, 118, 0.15);
    border-color: rgba(0, 230, 118, 0.3);
    color: var(--bma-green-bright);
}

.sport-glossary {
    display: none;
}

.sport-glossary.active {
    display: block;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .htp-layout {
        grid-template-columns: 240px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .htp-layout {
        grid-template-columns: 1fr;
    }

    .htp-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 2rem;
    }

    .how-to-play-hero {
        padding-top: calc(4rem + 120px);
        padding-bottom: 2.5rem;
    }

    .how-to-play-hero h1 {
        font-size: 2.25rem;
        line-height: 1.2;
    }

    .htp-section h2 {
        font-size: 1.65rem;
    }

    .step-card {
        padding: 1.25rem;
    }

    .step-card h4 {
        font-size: 1rem;
    }

    .step-card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .accordion-header {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .accordion-content {
        padding: 0 1rem;
    }

    .accordion-item.active .accordion-content {
        padding: 0.75rem 1rem 1rem 1rem;
    }

    .concept-grid,
    .odds-explainer,
    .outcomes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .sports-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 0.5rem;
    }

    .sport-tab {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .container-full {
        padding: 0 0.75rem;
    }

    .how-to-play-hero {
        padding-top: calc(3rem + 120px);
        padding-bottom: 2rem;
    }

    .how-to-play-hero h1 {
        font-size: 1.75rem;
    }

    .htp-section h2 {
        font-size: 1.4rem;
    }

    .htp-section h3 {
        font-size: 1.25rem;
    }

    .step-card {
        padding: 1rem;
        gap: 0.85rem;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }

    .step-card h4 {
        font-size: 0.95rem;
    }

    .step-card p {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .accordion-header {
        padding: 0.65rem 0.85rem;
        font-size: 0.9rem;
    }

    .sport-tab {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   BREADCRUMB
   ======================================== */

.breadcrumb {
    background: rgba(10, 10, 10, 0.6);
    border-bottom: 1px solid rgba(46, 139, 87, 0.2);
    padding: 1rem 0;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--bma-green-bright);
}

.breadcrumb-item.active {
    color: var(--bma-white);
    font-weight: 500;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
}

.breadcrumb .icon {
    width: 16px;
    height: 16px;
}
