* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100vw;
    height: 100vh;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background: #0a0a12;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0.92;
    transition: opacity 0.7s;
    background: transparent;
}

.stars {
    display: none !important;
}

.main-button {
    max-width: 360px;
    width: 92%;
    font-size: 1.22rem;
    padding: 1.25rem 2.4rem;
    border-radius: 100px;
    background: linear-gradient(90deg, #4b3a8c 0%, #7B5EE4 60%, #23244a 100%);
    color: #fffbe6;
    font-weight: 800;
    box-shadow: 0 2px 28px 0 #4b3a8c77, 0 0 24px 8px #23244a55;
    border: none;
    cursor: pointer;
    transition: 
        transform 0.85s cubic-bezier(.4,1,.6,1), 
        background 0.5s cubic-bezier(.4,2,.6,1),
        box-shadow 0.85s cubic-bezier(.4,2,.6,1),
        filter 0.5s;
    letter-spacing: 0.04em;
    display: block;
    position: relative;
    z-index: 10;
    outline: none;
    filter: drop-shadow(0 0 12px #4b3a8c55);
    animation: buttonPulseCosmic 2.2s infinite;
    margin: 0 auto;
}

@keyframes buttonPulseCosmic {
    0% { box-shadow: 0 2px 28px 0 #4b3a8c77, 0 0 24px 8px #23244a55; }
    50% { box-shadow: 0 2px 38px 0 #7B5EE4bb, 0 0 32px 12px #23244a77; }
    100% { box-shadow: 0 2px 28px 0 #4b3a8c77, 0 0 24px 8px #23244a55; }
}

.main-button:hover, .main-button:focus {
    background: linear-gradient(90deg, #23244a 0%, #7B5EE4 60%, #4b3a8c 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 32px 0 #7B5EE488, 0 0 44px 24px #23244a44;
    filter: brightness(1.07) drop-shadow(0 0 24px #7B5EE488);
    animation: buttonPulseCosmicHover 1.6s infinite;
    transition: 
        transform 0.55s cubic-bezier(.4,1,.6,1), 
        background 0.5s cubic-bezier(.4,2,.6,1),
        box-shadow 0.7s cubic-bezier(.4,2,.6,1),
        filter 0.5s;
}

@keyframes buttonPulseCosmicHover {
    0% { box-shadow: 0 4px 36px 0 #7B5EE4bb, 0 0 24px 8px #23244a77; }
    50% { box-shadow: 0 4px 48px 0 #a78bfaee, 0 0 36px 16px #23244a99; }
    100% { box-shadow: 0 4px 36px 0 #7B5EE4bb, 0 0 24px 8px #23244a77; }
}

.main-button:active {
    transform: scale(0.97);
    filter: brightness(1.12) drop-shadow(0 0 18px #7B5EE4cc);
    box-shadow: 0 2px 18px 0 #7B5EE4cc, 0 0 0 0 #23244a00;
}

.prediction-box {
    width: 90%;
    max-width: 480px;
    background: rgba(40, 44, 66, 0.82);
    border-radius: 16px;
    padding: 1.5rem 2.2rem;
    border: 2px solid #7B5EE4;
    box-shadow: 0 4px 24px 0 rgba(123, 94, 228, 0.13);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all 0.3s ease;
    margin: 24px auto;
    opacity: 0;
    transform: scale(0.92);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.92);
}

.prediction-box.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.prediction-box.hide {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
}

.prediction-text {
    color: #fff;
    font-size: 1.35rem;
    line-height: 1.5;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 8px #a78bfa55, 0 0 18px #a78bfa22;
    word-break: break-word;
}

.star {
    display: none;
}

.prediction-button {
    background: linear-gradient(90deg, #7B5EE4 0%, #A78BFA 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4,2,.6,1);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    width: 100%;
    box-shadow: 0 2px 12px 0 rgba(123, 94, 228, 0.10);
    letter-spacing: 0.03em;
    margin-top: 1.5rem;
}

.prediction-button:hover {
    background: linear-gradient(90deg, #A78BFA 0%, #7B5EE4 100%);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 24px 0 rgba(123, 94, 228, 0.13);
}

.prediction-button:active {
    transform: translateY(1px) scale(0.98);
}

.prediction-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.prediction-text.new-prediction {
    animation: fadeIn 1s ease-out;
}

.fortune-wait {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.45rem;
    color: #fff;
    font-weight: 700;
    text-align: center;
    z-index: 30;
    animation: pulse 1.1s infinite;
    padding: 16px;
    width: 90%;
    max-width: 480px;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.header-energy {
    width: 100vw;
    min-width: 320px;
    background: transparent !important;
    /* box-shadow: 0 2px 16px 0 #a78bfa22; */
    padding: 1.1em 0 1.1em 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: none !important;
    border: none !important;
}

.header-energy-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 1.2em;
    margin: 0;
    max-width: none;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.icon-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38em;
    margin: 0 0.22em;
    background: rgba(20, 20, 36, 0.54);
    border-radius: 1.7em;
    border: 2px solid #2e3050;
    box-shadow: 0 4px 24px 0 #a78bfa22;
    backdrop-filter: blur(8px);
    padding: 0.32em 1.1em 0.32em 0.85em;
    transition: background 0.3s, box-shadow 0.3s, border 0.3s, padding 0.3s, transform 0.25s;
    cursor: pointer;
    min-height: 2.2em;
}

.icon-badge:hover, .icon-badge:focus {
    box-shadow: 0 4px 32px 0 #ffe06655, 0 0 0 4px #ffe06622;
    background: rgba(50, 52, 90, 0.98);
    border-color: #ffe066;
    transform: scale(1.045);
    z-index: 10;
}

.icon-badge.right:hover, .icon-badge.right:focus {
    box-shadow: 0 4px 32px 0 #a78bfa55, 0 0 0 4px #a78bfa22;
    border-color: #a78bfa;
}

/* Tooltip */
.icon-badge[data-tooltip]:hover::after, .icon-badge[data-tooltip]:focus::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    left: auto;
    right: 110%;
    transform: translateY(-50%) scale(1);
    background: linear-gradient(90deg, #23244a 60%, #a78bfa 100%);
    color: #fffbe6;
    font-size: 0.98em;
    font-weight: 600;
    padding: 0.7em 1.3em;
    border-radius: 1em;
    box-shadow: 0 6px 32px 0 #a78bfa33;
    white-space: nowrap;
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 100;
}
.icon-badge.left[data-tooltip]:hover::after, .icon-badge.left[data-tooltip]:focus::after {
    left: 110%;
    right: auto;
    background: linear-gradient(90deg, #ffe066 0%, #a78bfa 100%);
    color: #23244a;
}
.icon-badge[data-tooltip]::after {
    content: '';
    opacity: 0;
    transform: translateY(-50%) scale(0.95);
    transition: opacity 0.25s, transform 0.25s;
}
/* Стрелочка для tooltip */
.icon-badge[data-tooltip]:hover::before, .icon-badge[data-tooltip]:focus::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right: 10px solid #a78bfa;
    z-index: 101;
}
.icon-badge.left[data-tooltip]:hover::before, .icon-badge.left[data-tooltip]:focus::before {
    left: 100%;
    right: auto;
    border: 8px solid transparent;
    border-left: 10px solid #ffe066;
}

.icon-badge.left {
    margin-left: 0;
}
.icon-badge.right {
    margin-right: 0;
}

.header-spacer {
    display: none;
}

.energy-icon, .attempts-icon {
    font-size: 1.45em;
    width: 1.45em;
    height: 1.45em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffe066;
    background: none;
    margin: 0;
    line-height: 1;
}

.energy-icon {
    color: #ffe066;
    filter: drop-shadow(0 0 6px #ffe06699);
    font-size: 1.45em;
}

.attempts-icon {
    color: #a78bfa;
    filter: drop-shadow(0 0 6px #a78bfa99);
    font-size: 1.32em;
}

.energy-label, .attempts-label {
    display: none;
}

.energy-badge, .attempts-badge {
    background: linear-gradient(90deg, #23244a 60%, #ffe06622 100%);
    color: #ffe066;
    border: 2px solid #ffe066;
    box-shadow: 0 0 8px #ffe06655, 0 2px 8px #23244a99;
}

.attempts-badge {
    background: linear-gradient(90deg, #23244a 60%, #a78bfa22 100%);
    color: #a78bfa;
    border: 2px solid #a78bfa;
    box-shadow: 0 0 8px #a78bfa55, 0 2px 8px #23244a99;
}

.energy-value, .attempts-value {
    color: inherit;
    font-size: 1.13em;
    font-weight: 700;
    margin-left: 0.18em;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 4px #ffe06633;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-width: 1.7em;
    padding: 0 0.1em;
}

.badge, .energy-badge, .attempts-badge {
    display: none !important;
}

@media (max-width: 700px) {
    .main-button {
        position: fixed !important;
        left: 50% !important;
        top: 48% !important;
        transform: translate(-50%, -50%) !important;
        width: 80vw !important;
        max-width: 340px !important;
        min-width: 180px !important;
        padding: 1.3em 0 !important;
        font-size: 1.13rem !important;
        border-radius: 100px !important;
        margin: 0 !important;
        z-index: 100 !important;
    }
    .prediction-box,
    .prediction-static,
    .fortune-wait {
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 92vw !important;
        max-width: 480px !important;
        margin: 0 !important;
        z-index: 100 !important;
    }
    .timer-inline {
        font-size: 0.91em !important;
        padding: 0.09em 0.7em !important;
        border-radius: 1em !important;
        margin: 0 0.18em !important;
        font-weight: 600 !important;
        box-shadow: 0 1px 8px 0 #7B5EE488, 0 0 4px #ffe06633 !important;
        border-width: 1px !important;
    }
    .timer-block {
        font-size: 0.97em !important;
        margin: 0.35em 0 0.15em 0 !important;
    }
}

.prediction-static {
    position: static !important;
    transform: none !important;
    width: 90% !important;
    max-width: 1000px !important;
    margin: 24px auto !important;
    left: unset !important;
    top: unset !important;
    right: unset !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    opacity: 1 !important;
}

#actions-below > * {
    margin-top: 1.2em !important;
}

.container {
    width: 100%;
    min-height: 100vh;
    padding: 80px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    position: relative;
}

.prediction-box,
.prediction-static {
    max-width: 700px;
    font-size: 1.18rem;
}

.timer-inline {
    display: inline-block;
    background: rgba(30, 32, 60, 0.72);
    color: #fffbe6;
    font-weight: 700;
    font-size: 0.98em;
    padding: 0.16em 1.05em;
    border-radius: 1.5em;
    margin: 0 0.32em;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 16px 0 #7B5EE4aa, 0 0 8px #ffe06644;
    border: 1.5px solid #7B5EE4;
    text-shadow: 0 1px 8px #a78bfa88, 0 0 8px #fffbe655;
    backdrop-filter: blur(2.5px);
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

.prediction-message {
    text-align: center;
    font-size: 1.08em;
    line-height: 1.5;
}
.timer-block {
    margin: 0.5em 0 0.2em 0;
    font-size: 0.98em;
    font-weight: 700;
}
.prediction-action {
    margin-top: 0.2em;
    color: #ffe066;
    font-weight: 600;
    font-size: 1.04em;
}
.timer-inline {
    font-size: 0.97em;
    padding: 0.13em 0.7em;
    border-radius: 1em;
} 