@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');
body {
    font-family: 'Inter', sans-serif;
    -webkit-user-select: none; user-select: none;
    transition: background-color 0.5s ease, background-image 0.5s ease;
}
/* Фоны */
.location-bg-1 { background-image: url("images/u1.png"); background-size: cover; background-position: center; background-repeat: no-repeat; }
.location-bg-2 { background-image: url("images/u2.png"); background-size: cover; background-position: center; background-repeat: no-repeat; }
.location-bg-3 { background-image: url("images/u3.png"); background-size: cover; background-position: center; background-repeat: no-repeat; }
.location-bg-4 { background-image: url("images/u4.png"); background-size: cover; background-position: center; background-repeat: no-repeat; }
.location-bg-5 { background-image: url("images/u5.png"); background-size: cover; background-position: center; background-repeat: no-repeat; }
.location-bg-6 { background-image: url("images/u6.png"); background-size: cover; background-position: center; background-repeat: no-repeat; }

#kraken-animation-wrapper {
    animation: kraken-breath 4s ease-in-out infinite;
    width: 100%;
    height: 100%;
}

#kraken-image { 
    transition: transform 0.1s ease-out;
}

#kraken-image.tapped {
    transform: scale(0.95);
}

@keyframes kraken-breath {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* Основной стиль для круга за кракеном */
#kraken-bg-circle {
    transition: all 0.5s ease-out;
    width: 85vw;
    height: 85vw;
    max-width: 1000px;
    max-height: 1000px;
    border-radius: 50%;
    border: none;
}

/* Стили фона для разных редкостей 
.rarity-common-bg { background: url("images/fon1.png") no-repeat center center / cover; } 
.rarity-rare-bg { background: url("images/fon2.png") no-repeat center center / cover; }
.rarity-epic-bg { background: url("images/fon3.png") no-repeat center center / cover; }
.rarity-legendary-bg { background: url("images/fon4.png") no-repeat center center / cover; }
*/ 
/* Уникальные фоны для особых скинов (линии 31-45) */
.skin-line-bg-31 { background: url("images/effects/effects31.png") no-repeat center center / cover; }
.skin-line-bg-32 { background: url("images/effects/effects32.png") no-repeat center center / cover; }
.skin-line-bg-33 { background: url("images/effects/effects33.png") no-repeat center center / cover; }
.skin-line-bg-34 { background: url("images/effects/effects34.png") no-repeat center center / cover; }
.skin-line-bg-35 { background: url("images/effects/effects35.png") no-repeat center center / cover; }
.skin-line-bg-36 { background: url("images/effects/effects36.png") no-repeat center center / cover; }
.skin-line-bg-37 { background: url("images/effects/effects37.png") no-repeat center center / cover; }
.skin-line-bg-38 { background: url("images/effects/effects38.png") no-repeat center center / cover; }
.skin-line-bg-39 { background: url("images/effects/effects39.png") no-repeat center center / cover; }
.skin-line-bg-40 { background: url("images/effects/effects40.png") no-repeat center center / cover; }
.skin-line-bg-41 { background: url("images/effects/effects41.png") no-repeat center center / cover; }
.skin-line-bg-42 { background: url("images/effects/effects42.png") no-repeat center center / cover; }
.skin-line-bg-43 { background: url("images/effects/effects43.png") no-repeat center center / cover; }
.skin-line-bg-44 { background: url("images/effects/effects44.png") no-repeat center center / cover; }
.skin-line-bg-45 { background: url("images/effects/effects45.png") no-repeat center center / cover; }

/* Медиа-запрос для планшетов */
@media (max-width: 768px) {
    #kraken-bg-circle { width: 80vw; height: 80vw; max-width: 200px; max-height: 200px; }
}

/* Медиа-запрос для телефонов */
@media (max-width: 480px) {
    #kraken-bg-circle { width: 65vw; height: 65vw; max-width: 650px; max-height: 650px; }
}

.nav-button {
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
}
.nav-button:not(.active):hover {
    transform: translateY(-4px);
    background-color: rgba(59, 130, 246, 0.3);
}

.nav-button.active { background-color: rgba(37, 99, 235, 0.7); }
.nav-button-side.active { background-color: rgba(37, 99, 235, 0.7); }

main { 
    display: none; 
    animation: screen-fade-in 0.4s ease-out forwards;
}
main.active { 
    display: flex; 
}
@keyframes screen-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.glass-panel {
    background-color: rgba(10, 15, 25, 0.5);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
/* Стили для магазина */
.shop-tab-btn {
    flex-grow: 1; padding: 0.75rem 0; text-align: center; font-weight: 600;
    color: #9ca3af; border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.shop-tab-btn.active { color: white; border-bottom-color: #3b82f6; }

.shop-tab-content {
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

/* Стили для скинов */
.rarity-common { border-color: #6b7280; }
.rarity-rare { border-color: #3b82f6; }
.rarity-epic { border-color: #8b5cf6; }
.rarity-legendary { border-color: #f59e0b; }

/* Стили для рулетки v3.0 */
#roulette-modal .modal-content {
    background: linear-gradient(180deg, #1e3a8a 0%, #1e1b4b 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.3);
}
#roulette-container {
    width: 100%;
    height: 100px;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    background: rgba(0,0,0,0.3);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}
#roulette-reel {
    height: 100%;
    display: flex;
    position: absolute;
    left: 0;
    transform: translateX(0);
}
.roulette-item {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 5px;
    box-sizing: border-box;
    background: rgba(255,255,255,0.05);
    margin: 0 2px;
    border-radius: 5px;
    border: 2px solid transparent;
    transition: border-color 0.3s, transform 0.3s;
    transform: scale(0.9);
    opacity: 0.7;
}
.roulette-item img {
    max-width: 50px;
    max-height: 50px;
    object-fit: contain;
}
.roulette-item-name {
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 90%;
}
#roulette-pointer {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #3b82f6; /* blue-600 */
    z-index: 10;
    animation: pointer-bob 1s infinite ease-in-out;
}
@keyframes pointer-bob {
    0%, 100% { top: -5px; }
    50% { top: 0px; }
}
.roulette-item.won {
    animation: pulse-glow 1.5s infinite;
    transform: scale(1);
    opacity: 1;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 var(--glow-color, #fff); }
    70% { box-shadow: 0 0 10px 5px var(--glow-color, #fff); }
    100% { box-shadow: 0 0 0 0 var(--glow-color, #fff); }
}

#roulette-prize-name-container .prize-content {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
#roulette-prize-name-container .prize-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.case-prizes-info-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 10;
    cursor: pointer;
}
/* Кнопка рулетки */
.case-prizes-info-btn img {
    /*width: 50%;
    height: 50%;*/
  width: 500px;
  height: auto; /* сохраняет пропорции */
   opacity: 0.5; /* 0 = полностью прозрачная, 1 = полностью видимая */
    transition: transform 0.2s ease-in-out;
}

.case-prizes-info-btn:hover img {
  transform: scale(1.1);
   opacity: 1; /* 0 = полностью прозрачная, 1 = полностью видимая */
}

.loader-icon {
    animation: pulse-gold-glow 2s infinite ease-in-out;
}

@keyframes pulse-gold-glow {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.5));
  }
  50% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(250, 204, 21, 0.9));
  }
}

.notification-dot {
    animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5); /* slate-900/50 */
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: #0891b2; /* cyan-600 */
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #06b6d4; /* cyan-500 */
}

#prizes-info-modal .modal-content-alt {
    background: linear-gradient(180deg, #1e3a8a 0%, #1e1b4b 100%); /* blue-900 to indigo-900 */
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.profit-boosted {
    color: #a855f7; /* purple-500 */
    text-shadow: 0 0 8px #a855f7, 0 0 12px #a855f7;
    animation: pulse-purple 2s infinite;
}

@keyframes pulse-purple {
    0%, 100% {
        text-shadow: 0 0 8px #a855f7, 0 0 12px #a855f7;
    }
    50% {
        text-shadow: 0 0 12px #c084fc, 0 0 20px #c084fc;
    }
}

/* --- НОВЫЕ АНИМАЦИИ UI/UX --- */

/* Эффект парения Кракена */
#kraken {
    animation: kraken-float 6s ease-in-out infinite;
}
@keyframes kraken-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Эффект вспышки при обновлении баланса */
.balance-updated {
    animation: balance-flash 0.4s ease-out;
}
@keyframes balance-flash {
    50% { 
        transform: scale(1.1); 
        background-color: rgba(250, 204, 21, 0.2); /* yellow-400 with alpha */
    }
}

/* Эффект водных пузырей */
.water-bubble {
    position: absolute;
    bottom: -20px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1) 60%, transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 0;
    animation: bubble-rise 5s linear infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes bubble-rise {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-80vh) translateX(var(--wobble, 0px)) scale(0.8);
        opacity: 0;
    }
}

/* Стили для карты - УЛУЧШЕНИЯ */
.location-node {
    position: absolute; display: flex; flex-direction: column; align-items: center; text-align: center;
    transform: translate(-50%, -50%); padding: 0.25rem;
    background-color: rgba(10, 15, 25, 0.65); border-radius: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.2); width: 85px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6); backdrop-filter: blur(6px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-node:hover {
    transform: translate(-50%, -50%) scale(1.1);
}
.location-node .title { font-weight: 600; font-size: 0.6rem; margin-top: 0.1rem; }
.location-node .cost { font-size: 0.55rem; color: #facc15; margin-top: 0.1rem; font-weight: 600;}
.location-node .location-btn {
    width: 100%; margin-top: 0.3rem; padding: 0.1rem 0.3rem; border-radius: 0.4rem;
    font-size: 0.6rem; font-weight: bold; transition: background-color 0.2s;
}

.location-active {
    animation: pulse-glow-map-green 2s infinite;
}

.location-unlockable {
     animation: pulse-glow-map-yellow 2s infinite;
}

@keyframes pulse-glow-map-green {
    0%, 100% { box-shadow: 0 0 10px rgba(22, 163, 74, 0.5), 0 0 15px rgba(22, 163, 74, 0.3); }
    50% { box-shadow: 0 0 20px rgba(22, 163, 74, 1), 0 0 30px rgba(22, 163, 74, 0.5); }
}

@keyframes pulse-glow-map-yellow {
    0%, 100% { box-shadow: 0 0 10px rgba(234, 179, 8, 0.5), 0 0 15px rgba(234, 179, 8, 0.3); }
    50% { box-shadow: 0 0 20px rgba(234, 179, 8, 1), 0 0 30px rgba(234, 179, 8, 0.5); }
}

/* -- ИСПРАВЛЕНИЯ ДЛЯ РУЛЕТКИ -- */
#roulette-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Распределяем пространство */
    flex-grow: 1; /* Занимает все доступное место */
    min-height: 12rem;
}
#roulette-prize-name-container {
    text-align: center;
    width: 100%;
}

#roulette-buttons-container {
    width: 100%;
    padding-top: 1rem; /* Добавим отступ сверху на всякий случай */
}


/* Lottie контейнеры */
.roulette-item .lottie-container {
    width: 50px;
    height: 50px;
}
.prize-info-item.lottie-container {
    width: 40px;
    height: 40px;
    background-color: rgba(0,0,0,0.3);
    border-radius: 0.375rem;
    padding: 0.25rem;
}
.prize-animation {
    width: 120px;
    height: 120px;
    margin: 0 auto; /* Центрируем анимацию */
}

/* Floating text for taps */
.floating-text {
    position: absolute;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    animation: float-up 1s ease-out forwards;
    pointer-events: none;
    display: flex;
    align-items: center;
}
.floating-text img {
    height: 1.2em;
    margin-left: 0.2em;
}

@keyframes float-up {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-80px);
        opacity: 0;
    }
}