* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #12141d;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;

}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 850px;
    padding: 20px;
}

h1 {
    margin-bottom: 30px;
    font-size: 24px;
    color: #00ffcc;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Рулетка */
.roulette-wrapper {
    position: relative;
    width: 100%;
    height: 120px;
    background: #181c27;
    border: 2px solid #2a3142;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.6);
}

.roulette-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #00ffcc;
    z-index: 10;
}

.roulette-track {
    display: flex;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    will-change: transform;
}

.item-card {
    min-width: 120px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #2a3142;
    background: #1f2433;
    padding: 8px;
}

.item-card.success {
    background: rgba(0, 255, 204, 0.1);
    border-bottom: 4px solid #00ffcc;
}

.item-card.fail {
    background: rgba(255, 71, 87, 0.1);
    border-bottom: 4px solid #ff4757;
}

.item-title {
    font-size: 11px;
    color: #8b9bb4;
    margin-bottom: 5px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 105px;
}

.item-result {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
}

/* Арена скинов */
.upgrade-arena {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 25px;
    background: #181c27;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #2a3142;
    gap: 10px;
}

/* Панель переключателей слева */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-btn {
    background: #1a1e29;
    border: 1px solid #2a3142;
    color: #6c7a92;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.control-btn:hover {
    border-color: #00ffcc;
    color: #fff;
}

.control-btn.active {
    background: rgba(0, 255, 204, 0.12);
    border-color: #00ffcc;
    color: #00ffcc;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.2);
}

.skin-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30%;
}

.skin-slot label {
    font-size: 12px;
    color: #8b9bb4;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.temp-select {
    margin-bottom: 10px;
    background: #1a1e29;
    color: #fff;
    border: 1px solid #2a3142;
    padding: 5px;
    border-radius: 4px;
    width: 100%;
    outline: none;
}

.skin-display {
    width: 100%;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 12px;
    border-radius: 8px;
    background: #1f2433;
    border-bottom: 4px solid #2a3142;
    transition: all 0.3s;
}

.skin-display.my-skin {
    border-bottom-color: #aeb6c4;
}

.skin-display.target-skin {
    border-bottom-color: #eb4b4b;
}

.skin-name {
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
}

.skin-price {
    font-size: 16px;
    color: #00ffcc;
    font-weight: bold;
}
/* Блок со стрелкой и плашкой шанса */
.vs-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 15%;
}

.vs-icon {
    font-size: 22px;
    color: #4a5568;
    font-weight: bold;
}

.chance-badge {
    font-size: 14px;
    font-weight: bold;
    color: #00ffcc;
    background: #12141d;
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid #00ffcc;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.2);
    white-space: nowrap;
}

/* Панель пресетов справа */
.presets-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.preset-btn {
    background: #1a1e29;
    border: 1px solid #2a3142;
    color: #8b9bb4;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    border-color: #00ffcc;
    color: #00ffcc;
    background: rgba(0, 255, 204, 0.08);
}

/* Кнопка */
.upgrade-btn {
    background: linear-gradient(135deg, #00ffcc, #00b386);
    color: #12141d;
    border: none;
    border-radius: 8px;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.1s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 255, 204, 0.3);
    width: 100%;
    text-indent: -50px;
}

.upgrade-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 255, 204, 0.5);
}

.upgrade-btn:active {
    transform: scale(0.98);
}

.upgrade-btn:disabled {
    background: #2a3142;
    color: #6c7a92;
    cursor: not-allowed;
    box-shadow: none;
}

.result-message {
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    min-height: 25px;
    text-indent: -50px;
}
/* Панель профиля Steam */
.user-profile-bar {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    background: #181c27;
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid #2a3142;
    z-index: 100;
}

.steam-login-img {
    height: 32px;
    vertical-align: middle;
}

#loggedInState {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #00ffcc;
}

#userName {
    font-weight: bold;
    color: #fff;
    font-size: 14px;
}

#logoutBtn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.2s;
}

#logoutBtn:hover {
    opacity: 0.8;
}
/* ================================= */
/*       Стили верхней панели        */
/* ================================= */

/* Делаем отступ сверху у body, чтобы шапка не перекрывала контент */
body {
    padding-top: 80px; 
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #181c27; /* Фон чуть светлее основного */
    border-bottom: 1px solid #2a3142;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    z-index: 1000;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    color: #00ffcc;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

.stats-block {
    display: flex;
    gap: 25px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 11px;
    color: #8b9bb4;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tg-btn, .notify-btn {
    background: #1f2433;
    border: 1px solid #2a3142;
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.tg-btn:hover, .notify-btn:hover {
    border-color: #00ffcc;
    background: #252b38;
    color: #00ffcc;
}

.balance-block {
    display: flex;
    align-items: center;
    background: #1f2433;
    border: 1px solid #2a3142;
    border-radius: 8px;
    padding: 4px 4px 4px 15px;
    gap: 15px;
}

.balance-amount {
    font-size: 15px;
    font-weight: bold;
    color: #00ffcc;
}

.deposit-btn {
    background: #00ffcc;
    color: #12141d;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.deposit-btn:hover {
    background: #00e6b8;
}

.avatar-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid #2a3142;
    cursor: pointer;
    transition: border-color 0.2s;
    object-fit: cover;
}

.header-avatar:hover {
    border-color: #00ffcc;
}
/* ================================= */
/*       Выпадающее окно уведомлений */
/* ================================= */

.notify-wrapper {
    position: relative; /* Чтобы окно позиционировалось относительно этой обертки */
}

.notify-popup {
    display: none; /* Скрыто по умолчанию */
    position: absolute;
    top: 55px; /* Опускаем чуть ниже кнопки */
    right: 0; /* Прижимаем к правому краю кнопки */
    width: 280px;
    background: #181c27;
    border: 1px solid #2a3142;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
    z-index: 1000;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

/* Класс, который будет добавлять JavaScript для показа окна */
.notify-popup.show {
    display: flex;
}

.notify-header {
    background: #1f2433;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: bold;
    color: #00ffcc;
    border-bottom: 1px solid #2a3142;
}

.notify-body {
    padding: 20px 15px;
    font-size: 13px;
    color: #8b9bb4;
    text-align: center;
    min-height: 60px;
}

/* Небольшая анимация плавного появления */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Кнопка в шапке */
.auth-header-btn {
    background: #ff4757;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}
.auth-header-btn:hover {
    background: #ff6b81;
}

/* Модальное окно регистрации */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #1a1a24;
    padding: 30px;
    border-radius: 12px;
    width: 320px;
    position: relative;
    color: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    background: #121218;
    border: 1px solid #2a2a38;
    border-radius: 6px;
    color: #fff;
    box-sizing: border-box;
}

.modal-content button {
    width: 100%;
    padding: 10px;
    background: #2ed573;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-content button:hover {
    background: #26af5f;
}

/* Кнопка закрытия */
.close-btn {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: #aaa;
}
.close-btn:hover {
    color: #fff;
}

/* Выпадающее меню профиля */
.profile-dropdown {
    position: absolute;
    top: 70px;
    right: 20px;
    width: 280px;
    background: #1a1a24;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 999;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #2a2a38;
    padding-bottom: 10px;
}

.profile-header h3 {
    margin: 0;
}

.profile-body p {
    margin: 8px 0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.profile-body hr {
    border: 0;
    border-top: 1px solid #2a2a38;
    margin: 12px 0;
}

.history-list {
    max-height: 120px;
    overflow-y: auto;
    font-size: 12px;
    color: #aaa;
}
.history-list div {
    padding: 4px 0;
    border-bottom: 1px dashed #2a2a38;
}