
/* ===================================== */
/* SLOT FRUTY - PLINKO                   */
/* ===================================== */

.plinko-page {
    background: #100D18;
    color: #F5F1FA;
    min-height: 100vh;
}

/* ===================================== */
/* STRUCTURE PRINCIPALE                  */
/* ===================================== */

.plinko-main {
    width: min(1250px, 92%);
    margin: 0 auto;
    padding: 55px 0 80px;
}

.plinko-heading {
    margin-bottom: 35px;
}

.plinko-eyebrow {
    color: #F2C45C;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.plinko-heading h1 {
    font-size: clamp(2.3rem, 5vw, 3.5rem);
    margin: 10px 0;
}

.plinko-heading p {
    color: #AAA0B9;
    line-height: 1.6;
}

/* ===================================== */
/* DISPOSITION                           */
/* ===================================== */

.plinko-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 25px;
    align-items: start;
}

/* ===================================== */
/* PANNEAUX                              */
/* ===================================== */

.plinko-controls,
.plinko-board-container {
    background: #1C1728;
    border: 1px solid #342843;
    border-radius: 16px;
    padding: 25px;
    min-width: 0;
}

/* ===================================== */
/* COMMANDES                             */
/* ===================================== */

.plinko-controls h2 {
    font-size: 1.3rem;
    margin: 0 0 30px;
}

.control-group {
    margin-bottom: 25px;
}

.control-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #D7CDE3;
}

.control-group input,
.control-group select {
    width: 100%;
    min-width: 0;
    background: #100D18;
    color: #F5F1FA;
    border: 1px solid #443352;
    border-radius: 9px;
    padding: 13px;
    font-size: 1rem;
    outline: none;
}

.control-group input:focus,
.control-group select:focus {
    border-color: #8739CF;
}

/* ===================================== */
/* MISE                                  */
/* ===================================== */

.bet-input-wrapper {
    display: flex;
    align-items: center;
    background: #100D18;
    border: 1px solid #443352;
    border-radius: 9px;
    overflow: hidden;
}

.bet-input-wrapper:focus-within {
    border-color: #8739CF;
}

.bet-input-wrapper input {
    border: none;
    background: transparent;
}

.bet-input-wrapper span {
    padding-right: 12px;
    font-size: 0.8rem;
    color: #AAA0B9;
}

.bet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.bet-actions button {
    padding: 10px;
    background: #30243F;
    color: #F5F1FA;
    border: 1px solid #49355E;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.bet-actions button:hover {
    background: #49335F;
}

/* ===================================== */
/* BOUTON JOUER                          */
/* ===================================== */

.plinko-play-button {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 17px;

    background: linear-gradient(
        135deg,
        #8739CF,
        #F044A0
    );

    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;

    transition:
        transform 0.2s,
        filter 0.2s;
}

.plinko-play-button:not(:disabled):hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

.plinko-play-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.plinko-notice {
    color: #AAA0B9;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
    margin-top: 15px;
}

/* ===================================== */
/* EN-TÊTE DU PLATEAU                    */
/* ===================================== */

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.board-status {
    color: #F2C45C;
    background: #3A3023;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* ===================================== */
/* PLATEAU                               */
/* ===================================== */

.plinko-board {
    position: relative;
    width: 100%;
    min-height: 0;

    overflow: hidden;
    isolation: isolate;

    border-radius: 12px;

    background: radial-gradient(
        ellipse at 50% 55%,
        #281B3A 0%,
        #120F1C 75%
    );
}

/* ===================================== */
/* COUCHES DU PLATEAU                    */
/* ===================================== */

.plinko-pegs,
.plinko-balls,
.plinko-multipliers {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.plinko-pegs {
    z-index: 2;
}

.plinko-multipliers {
    z-index: 3;
}

.plinko-balls {
    z-index: 5;
    overflow: hidden;
}

/* ===================================== */
/* OBSTACLES                             */
/* ===================================== */

.peg {
    position: absolute;
    display: block;

    border-radius: 50%;
    background: #C8B4E1;

    box-shadow:
        0 0 7px rgba(178, 118, 236, 0.45);

    transform: translate(-50%, -50%);
}

/* ===================================== */
/* BILLES                                */
/* ===================================== */

.plinko-ball {
    position: absolute;
    top: 0;
    left: 0;

    width: var(--ball-size, 12px);
    height: var(--ball-size, 12px);

    box-sizing: border-box;
    border-radius: 50%;

    background: radial-gradient(
        circle at 30% 25%,
        #FFFFFF,
        #F2C45C 40%,
        #E28B30 85%
    );

    border: 1px solid #FFE8A5;

    box-shadow:
        0 0 10px rgba(242, 196, 92, 0.8),
        0 0 20px rgba(242, 196, 92, 0.25);

    will-change: transform;
}

/* ===================================== */
/* MULTIPLICATEURS                       */
/* ===================================== */

.multiplier {
    position: absolute;
    bottom: 7px;

    height: 29px;
    min-height: 29px;

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 5px;
    color: white;
    font-weight: 700;

    box-shadow:
        0 3px 0 rgba(0, 0, 0, 0.25);

    transform: translateX(-50%);

    transition:
        filter 0.2s,
        margin-bottom 0.2s;
}

.multiplier.edge {
    background: #E64C87;
}

.multiplier.outer {
    background: #D97845;
}

.multiplier.middle {
    background: #AD6A34;
}

.multiplier.center {
    background: #8739CF;
}

.multiplier.hit {
    filter: brightness(1.7);
    margin-bottom: 4px;
}

/* ===================================== */
/* STATISTIQUES                          */
/* ===================================== */

.plinko-stats {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #342843;
}

.plinko-stats-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.plinko-stats-heading button {
    background: #30243F;
    border: 1px solid #49355E;
    color: #F5F1FA;

    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
}

.plinko-stats-heading button:hover {
    background: #49335F;
}

.plinko-stats p {
    color: #AAA0B9;
    font-size: 0.8rem;
    line-height: 1.5;
}

.plinko-stats-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.plinko-stat-cell {
    background: #30243F;
    border-radius: 5px;

    padding: 5px 7px;

    font-size: 0.72rem;
    color: #E4D9F2;
}

/* ===================================== */
/* INFORMATIONS                          */
/* ===================================== */

.plinko-information {
    margin-top: 45px;
    padding: 30px;

    background: #1C1728;
    border: 1px solid #342843;
    border-radius: 16px;
}

.plinko-information h2 {
    margin: 0 0 20px;
}

.plinko-information p {
    color: #AAA0B9;
    line-height: 1.8;
    margin: 0 0 12px;
}

/* ===================================== */
/* FOOTER                                */
/* ===================================== */

.plinko-footer {
    text-align: center;
    padding: 30px 15px;

    color: #AAA0B9;
    border-top: 1px solid #342843;

    font-size: 0.85rem;
}

/* ===================================== */
/* RESPONSIVE                            */
/* ===================================== */

@media (max-width: 850px) {

    .plinko-layout {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 480px) {

    .plinko-main {
        width: 94%;
        padding-top: 30px;
    }

    .plinko-controls,
    .plinko-board-container {
        padding: 15px;
    }

    .plinko-information {
        padding: 20px;
    }

}


/* ===================================
   PLINKO - SIMULATION MASSIVE
=================================== */

.plinko-simulator {
    margin-top: 22px;
    padding: 18px;
    background: #21192F;
    border: 1px solid #443352;
    border-radius: 12px;
}

.plinko-simulator h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #F5F1FA;
}

.plinko-simulator p {
    color: #AAA0B9;
    font-size: 0.85rem;
    line-height: 1.5;
}

.simulator-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.simulator-actions button {
    padding: 10px 16px;
    background: #38264C;
    color: #F5F1FA;
    border: 1px solid #624579;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.simulator-actions button:hover:not(:disabled) {
    background: #55366F;
}

.simulator-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#simulator-progress {
    margin-top: 12px;
    color: #F2C45C;
}

/* MULTIBILLES */

.plinko-simulator + .plinko-simulator {
    margin-top: 15px;
}

.plinko-simulator button:disabled,
#plinko-reset-stats:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* =======================================
   PLINKO - PLATEAU RESPONSIVE FIXE
   ======================================= */

/*
   Le conteneur s'adapte à l'écran.
   Le plateau conserve une largeur
   logique de 760px.
*/

.plinko-board-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

/*
   Le JavaScript applique le scale()
   nécessaire sur téléphone.
*/

.plinko-board-viewport > .plinko-board {
    position: relative;
    width: 760px;
    min-width: 760px;
    max-width: none;

    transform-origin: top left;
    flex-shrink: 0;
}

/*
   Évite les transitions de taille
   pendant les simulations physiques.
*/

.plinko-board-viewport .plinko-board {
    transition: none;
}

/*
   Les statistiques restent à leur
   taille normale et lisible.
*/

@media (max-width: 480px) {
    .plinko-board-viewport {
        width: 100%;
    }

    .plinko-stats {
        margin-top: 16px;
    }
}


/* =======================================
   SLOT FRUTY 2.0 - INTERFACE JOUEUR
   ======================================= */

/* Plateau responsive à physique fixe */

.plinko-board-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.plinko-board-viewport > .plinko-board {
    position: relative;
    width: 760px;
    min-width: 760px;
    max-width: none;
    transform-origin: top left;
    transition: none;
}

/* Anciens sélecteurs remplacés visuellement */

.plinko-original-choice {
    display: none;
}

/* Groupes de choix */

.plinko-game-choices {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.plinko-choice-group {
    margin-bottom: 24px;
}

.plinko-choice-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.plinko-choice-button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 42px;
    padding: 10px 7px;

    border: 1px solid #49355E;
    border-radius: 9px;

    background: #30243F;
    color: #E4D9F2;

    font-size: 0.9rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s,
        border-color 0.2s,
        filter 0.2s;
}

.plinko-choice-button:hover:not(:disabled) {
    background: #49335F;
}

.plinko-choice-button.active {
    background: linear-gradient(
        135deg,
        #8739CF,
        #A945C5
    );

    border-color: #C47BEB;
    color: #FFFFFF;
}

.plinko-choice-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Récapitulatif de la mise */

.plinko-game-summary {
    margin: 5px 0 20px;
    padding: 17px;

    background: #100D18;
    border: 1px solid #443352;
    border-radius: 12px;
}

.plinko-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;

    padding-bottom: 14px;
}

.plinko-summary-line span {
    color: #AAA0B9;
    font-size: 0.9rem;
}

.plinko-summary-line strong {
    color: #F2C45C;
    font-size: 1.1rem;
    text-align: right;
}

.plinko-summary-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;

    padding-top: 13px;
    border-top: 1px solid #342843;
}

.plinko-summary-details > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.plinko-summary-details span {
    color: #AAA0B9;
    font-size: 0.75rem;
}

.plinko-summary-details strong {
    color: #F5F1FA;
    font-size: 0.85rem;
}

/* Résultat de la dernière partie */

.plinko-round-result {
    margin-bottom: 20px;
    padding: 16px;

    background: #21192F;
    border: 1px solid #443352;
    border-radius: 12px;
}

.plinko-round-result > strong {
    display: block;
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.plinko-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.plinko-result-grid > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.plinko-result-grid span {
    color: #AAA0B9;
    font-size: 0.75rem;
}

.plinko-result-grid strong {
    color: #F5F1FA;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.plinko-round-result p {
    margin: 14px 0 0;
    color: #AAA0B9;
    font-size: 0.73rem;
    line-height: 1.5;
}

/* Outils développeur */

.plinko-developer-tools {
    margin-top: 22px;
    padding: 18px;

    background: #171221;
    border: 1px dashed #624579;
    border-radius: 12px;
}

.plinko-developer-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.plinko-developer-heading strong {
    font-size: 0.95rem;
}

.plinko-developer-heading span {
    color: #F2C45C;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.plinko-developer-tools > p {
    color: #AAA0B9;
    font-size: 0.8rem;
    line-height: 1.5;
}

.plinko-developer-tools .plinko-simulator {
    margin-top: 15px;
}

/* Ajustements mobile */

@media (max-width: 480px) {
    .plinko-choice-buttons {
        gap: 5px;
    }

    .plinko-choice-button {
        padding: 10px 4px;
        font-size: 0.82rem;
    }

    .plinko-game-summary,
    .plinko-round-result {
        padding: 14px;
    }

    .plinko-stats {
        margin-top: 16px;
    }
}


/* =======================================
   PLINKO - CADENCE DE LANCEMENT
   ======================================= */

.plinko-speed-group {
    margin-bottom: 24px;
}

.plinko-speed-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.plinko-speed-heading label {
    margin-bottom: 0;
}

.plinko-speed-heading strong {
    color: #F2C45C;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Slider */

.plinko-speed-group input[type="range"] {
    display: block;
    width: 100%;
    height: 8px;
    padding: 0;
    margin: 8px 0 12px;

    appearance: none;
    -webkit-appearance: none;

    border: none;
    border-radius: 20px;
    outline: none;

    background: linear-gradient(
        90deg,
        #8739CF,
        #F044A0
    );

    cursor: pointer;
}

/* Curseur Chrome, Edge, Safari */

.plinko-speed-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;

    width: 20px;
    height: 20px;

    border: 3px solid #F2C45C;
    border-radius: 50%;

    background: #1C1728;
    cursor: grab;
}

/* Curseur Firefox */

.plinko-speed-group input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;

    border: 3px solid #F2C45C;
    border-radius: 50%;

    background: #1C1728;
    cursor: grab;
}

/* Bornes */

.plinko-speed-labels {
    display: flex;
    justify-content: space-between;
    gap: 10px;

    color: #AAA0B9;
    font-size: 0.75rem;
}

.plinko-speed-group input[type="range"]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
