*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    color: white;
    background-color: black;
}

#game {
    padding-right: 280px;
}

#panels {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: flex-start;
    margin-top: 10px;
}

#panels > div {
    margin-top: 0;
}

#balance {
    color: green;
}

#mentalka {
    color: red;
}

#status {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 130px;
    overflow-y: auto;
    margin: 20px 0 40px;
}

#status .line {
    font-family: "Comic Sans MS", "Comic Sans", cursive;
    font-size: 20px;
    color: lime;
    transform: rotate(-1deg);
}

#status .line.bro {
    color: #9d7cff;
    font-style: italic;
}

#statsDiv {
    display: flex;
    gap: 20px;
}

#attrs {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    margin: 6px 0 22px;
    padding: 8px 16px;
    border: 1px dashed #6a2f8f;
    background: #0b0610;
    font-size: 17px;
}

#attrs .attr-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #9d7cff;
}

#attrs .attr {
    color: #bbb;
}

#attrs .attr b {
    color: #ff5ca8;
}

#shop {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-top: 20px;
}

#shop > p {
    display: flex;
    gap: 5px;
    align-items: center;
    margin: 0;
}

#shop button {
    margin-top: 0;
}

#shopItems {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

#looksmaxDiv {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-top: 20px;
}

#looksmaxDiv > p {
    margin: 0;
}

#looksmaxDiv button {
    margin-top: 0;
}

#looksmaxItems {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

#bank {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-top: 20px;
}

#bank > p {
    margin: 0;
}

#bank button {
    margin-top: 0;
}

#phone {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-top: 20px;
}

#phone > p {
    margin: 0;
}

#phoneItems {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

#phone button {
    margin-top: 0;
}

#finePrint {
    font-size: 9px;
    color: #555;
    max-width: 200px;
    line-height: 1.3;
    margin-top: 6px;
}

#screenTime {
    font-size: 12px;
    color: #777;
}

#debt {
    color: #ff6a00;
}

#tolerance {
    color: #b06cff;
}

#ropeBtn {
    display: none;
}

#restartBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
}

#clock {
    color: #8ab4ff;
}

#energy {
    color: #6fe3c4;
}

.energy {
    color: #6fe3c4;
    font-size: 12px;
}

#effects {
    color: orange;
    font-size: 14px;
    margin: 0 0 20px;
}

#casino {
    margin-top: 30px;
}

#wheelWrap {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 14px 0 20px 0;
}

#wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid #b8860b;
    box-shadow: 0 0 22px rgba(184, 134, 11, 0.7), inset 0 0 24px #000;
    position: relative;
    overflow: hidden;
}

.sector-label {
    position: absolute;
    inset: 0;
    padding-top: 9px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    pointer-events: none;
}

#pointer {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 24px solid gold;
    filter: drop-shadow(0 2px 3px #000);
    z-index: 2;
}

#casinoControls {
    display: flex;
    justify-content: center;
    gap: 10px;
}

#tinder {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 240px;
}

#tinderCard {
    width: 220px;
    padding: 14px;
    margin: 10px 0;
    border: 1px solid #ff5ca8;
    border-radius: 10px;
    background: #140810;
}

#tinderCard .t-name {
    font-size: 18px;
    font-weight: bold;
    color: #ff5ca8;
}

#tinderCard .t-bio {
    font-size: 13px;
    color: #bbb;
    margin-top: 6px;
}

#tinderControls {
    display: flex;
    align-items: center;
    gap: 10px;
}

#tinderCount {
    font-size: 13px;
    color: #888;
}

button {
    margin-top: 10px;
    color: white;
    background-color: #444;
    border: none;
}

/* ============================================================
   ПОДСВЕТКА КНОПОК — переиспользуемые эффекты
   ============================================================ */

button.glow-pulse {
    animation: glow-pulse 1.4s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 214, 0, 0.35); background-color: #444; }
    50% { box-shadow: 0 0 10px rgba(255, 214, 0, 1), 0 0 28px rgba(255, 214, 0, 0.55); background-color: #5c4a12; }
}

@property --rainbow-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

button.glow-rainbow {
    position: relative;
    z-index: 0;
}

button.glow-rainbow::before {
    content: '';
    position: absolute;
    inset: -4px;
    padding: 4px;
    background: conic-gradient(from var(--rainbow-angle),
        #ff2d55, #ff9500, #ffd60a, #34c759, #00c7be, #32ade6, #af52de, #ff2d55);
    animation: rainbow-spin 2.5s linear infinite, rainbow-throb 1.2s ease-in-out infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes rainbow-spin {
    from { --rainbow-angle: 0deg; }
    to { --rainbow-angle: 360deg; }
}

@keyframes rainbow-throb {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(160, 220, 255, 0.5)) brightness(1) saturate(1); }
    50% { filter: drop-shadow(0 0 10px rgba(160, 220, 255, 0.95)) brightness(1.4) saturate(1.4); }
}

/* ============================================================
   ТЕЛЕФОНЫ — одна колонка, крупные кнопки
   ============================================================ */

@media (max-width: 760px) {
    body {
        padding: 12px 12px 80px;
        overflow-x: hidden;
    }

    #game {
        padding-right: 0;
    }

    #statsDiv {
        flex-wrap: wrap;
        gap: 6px 16px;
    }

    #statsDiv p {
        margin: 0;
    }

    #status {
        max-height: 42vh;
        margin: 14px 0 20px;
    }

    #status .line {
        font-size: 17px;
    }

    #attrs {
        flex-wrap: wrap;
        gap: 8px 18px;
        margin: 4px 0 16px;
    }

    #events {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    #events button {
        flex: 1 1 44%;
        margin-top: 0;
        min-height: 46px;
    }

    #panels {
        flex-direction: column;
        gap: 16px;
    }

    #panels > div,
    #shopItems,
    #looksmaxItems,
    #phoneItems {
        width: 100%;
    }

    #shopItems button,
    #looksmaxItems button,
    #phoneItems button,
    #bank button {
        width: 100%;
        margin-top: 0;
        text-align: left;
        min-height: 46px;
    }

    #finePrint {
        max-width: none;
    }

    #casinoControls {
        gap: 8px;
    }

    .spinBtn {
        flex: 1;
        margin-top: 0;
        min-height: 46px;
    }

    #wheelWrap {
        margin-left: auto;
        margin-right: auto;
    }

    #tinder {
        position: static;
        width: 100%;
        margin-top: 24px;
        padding-top: 16px;
        border-top: 1px dashed #333;
    }

    #tinderCard {
        width: 100%;
    }

    #tinderControls {
        gap: 8px;
    }

    #tinderControls button {
        flex: 1;
        margin-top: 0;
        min-height: 46px;
    }

    #restartBtn {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        min-height: 48px;
    }
}
