/* spin-style.css - все стили для NFT Spin */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    text-align: center;
    margin-bottom: 30px;
    opacity: 0.9;
    font-size: 1.2em;
}

.price-badge {
    background: gold;
    color: #333;
    padding: 5px 15px;
    border-radius: 30px;
    font-weight: bold;
    display: inline-block;
    margin-left: 10px;
}

/* Карточка подключения */
.wallet-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.wallet-address {
    background: rgba(0,0,0,0.3);
    padding: 10px 20px;
    border-radius: 30px;
    font-family: monospace;
    font-size: 14px;
}

.user-stats {
    display: flex;
    gap: 15px;
}

.stat-badge {
    background: rgba(255,215,0,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid gold;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: gold;
    margin: 10px 0;
}
.nft-card-image {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    margin-bottom: 10px;
    object-fit: cover;
    border: 2px solid gold;
}

@media (max-width: 768px) {
    .nft-card-image {
        width: 70px;
        height: 70px;
    }
}

/* Слот-машина */
.case-container {
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin: 40px 0;
    border: 3px solid gold;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.case-title {
    font-size: 24px;
    font-weight: bold;
    color: gold;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.case-indicator {
    background: rgba(255,215,0,0.2);
    border: 1px solid gold;
    padding: 5px 15px;
    border-radius: 20px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.prize-track-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.prize-track-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}


.prize-track {
    display: flex;
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.prize-track.spinning {
    transition: transform 5s cubic-bezier(0.1, 0.7, 0.3, 1);
}
.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
    grid-column: 1/-1;
}

.prize-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Десктоп (по умолчанию) */
.prize-block {
    width: 180px;
    min-width: 180px;
    height: 180px;
    margin: 0 2px;
    font-size: 14px;
}

.prize-block:hover {
    background: rgba(255,215,0,0.2);
    transform: scale(1.02);
}
@media (max-width: 1024px) and (min-width: 769px) {
    .prize-block {
        width: 150px;
        min-width: 150px;
        height: 150px;
        font-size: 12px;
    }
    
    .prize-image {
        width: 80px;
        height: 80px;
    }
    
    .prize-emoji {
        font-size: 40px;
    }
}

/* Телефоны (481px - 768px) */
@media (max-width: 768px) and (min-width: 481px) {
    .prize-block {
        width: 130px;
        min-width: 130px;
        height: 130px;
        font-size: 11px;
        margin: 0 1px;
    }
    
    .prize-image {
        width: 60px;
        height: 60px;
    }
    
    .prize-emoji {
        font-size: 35px;
    }
    
    .prize-name {
        font-size: 10px;
    }
    
    .prize-value {
        font-size: 10px;
    }
}

/* Маленькие телефоны (до 480px) */
@media (max-width: 480px) {
    .prize-block {
        width: 100px;
        min-width: 100px;
        height: 100px;
        font-size: 10px;
        margin: 0 1px;
    }
    
    .prize-image {
        width: 45px;
        height: 45px;
    }
    
    .prize-emoji {
        font-size: 28px;
    }
    
    .prize-name {
        font-size: 9px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 90px;
    }
    
    .prize-value {
        font-size: 9px;
    }
}
/* Для очень маленьких экранов */
@media (max-width: 380px) {
    .prize-block {
        width: 85px;
        min-width: 85px;
        height: 85px;
    }
    
    .prize-image {
        width: 40px;
        height: 40px;
    }
    
    .prize-emoji {
        font-size: 24px;
    }
    
    .prize-name {
        font-size: 8px;
        max-width: 75px;
    }
}
@media (max-width: 480px) {
    .prize-track-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .slot-machine {
        overflow-x: auto;
    }
}

.prize-block.nft {
    border-bottom: 4px solid #4CAF50;
}

.prize-block.ton {
    border-bottom: 4px solid gold;
}

.prize-image {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid gold;
}

.prize-emoji {
    font-size: 48px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(255,215,0,0.5));
}

.prize-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    text-align: center;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prize-value {
    color: gold;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.buy-nft-btn {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border: none;
    color: #1a1a2e;
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.buy-nft-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(255,215,0,0.4);
    background: linear-gradient(45deg, #FFE44D, #FFB347);
}

/* Маркер (белая линия посередине) */
.marker {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 10px rgba(255,255,255,0.8);
    pointer-events: none;
}

.marker::before {
    content: '▼';
    position: absolute;
    top: -20px;
    left: -8px;
    color: gold;
    font-size: 20px;
    text-shadow: 0 0 10px gold;
}

.marker::after {
    content: '▲';
    position: absolute;
    bottom: -20px;
    left: -8px;
    color: gold;
    font-size: 20px;
    text-shadow: 0 0 10px gold;
}
/* Золотой час */
body.golden-hour {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%) !important;
}

body.golden-hour .container {
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

/* Кнопка прокрута */
.spin-button {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 30px auto;
    padding: 20px 40px;
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(45deg, #ffd700, #ffa500);
    border: none;
    border-radius: 50px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(255,215,0,0.3);
}

.spin-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255,215,0,0.6);
}

.spin-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spin-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(30deg); }
    20% { transform: translateX(100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

/* Результат */
.result-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
    border: 3px solid gold;
    display: none;
    transition: all 0.3s;
}

.result-card.show {
    display: block;
    animation: slideIn 0.5s;
}

.result-card.ton-prize {
    background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,165,0,0.2));
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.winning-prize {
    font-size: 120px;
    margin: 20px 0;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.winning-image {
    width: 150px;
    height: 150px;
    margin: 20px auto;
    border-radius: 20px;
    border: 4px solid gold;
    object-fit: cover;
    animation: bounce 1s infinite;
}

.prize-value {
    font-size: 48px;
    color: gold;
    margin: 10px 0;
    text-shadow: 0 0 20px rgba(255,215,0,0.5);
}

/* Сетка призов */
.prizes-section {
    margin: 40px 0;
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.prize-category {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    border: 2px solid rgba(255,215,0,0.3);
}

.prize-category h3 {
    margin-bottom: 15px;
    color: gold;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
}
/* Баланс */
.balance-section {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.balance-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.balance-info {
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.balance-amount {
    font-size: 32px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.balance-actions {
    display: flex;
    gap: 10px;
}

.balance-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.balance-btn span {
    font-size: 20px;
}

.deposit-btn {
    background: #4CAF50;
    color: white;
}

.deposit-btn:hover {
    background: #45a049;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.withdraw-btn {
    background: #ff9800;
    color: white;
}

.withdraw-btn:hover {
    background: #f57c00;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 152, 0, 0.4);
}
.withdraw-pending {
    background: #ff9800;
    color: #1a1a2e;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    animation: pulse 2s infinite;
}

.withdraw-success {
    background: #4caf50;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

.withdraw-rejected {
    background: #f44336;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.win-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
    display: block;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    display: block;
    margin-top: 5px;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    color: #333;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.close-modal:hover {
    color: #333;
}

.amount-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.amount-btn {
    padding: 15px 5px;
    background: #f0f0f0;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.amount-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.amount-btn.selected {
    background: #667eea;
    color: white;
    border-color: #4a5fd5;
}

.custom-amount {
    margin: 15px 0;
}

.custom-amount input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
}

.info-text {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-top: 15px;
}

/* Поля ввода для вывода */
.withdraw-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    margin: 10px 0;
}
#errorMessage {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        top: -50px;
        opacity: 0;
    }
    to {
        top: 20px;
        opacity: 1;
    }
}
.amount-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.amount-input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
}

.amount-input-group span {
    font-weight: bold;
    color: #667eea;
}

.current-balance-display {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    text-align: center;
    font-size: 18px;
}

.current-balance-display span {
    font-weight: bold;
    color: #4CAF50;
    font-size: 24px;
}

.prize-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.prize-list::-webkit-scrollbar {
    width: 5px;
}

.prize-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.prize-list::-webkit-scrollbar-thumb {
    background: gold;
    border-radius: 10px;
}

.prize-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.prize-item:hover {
    background: rgba(255,215,0,0.1);
    border-color: gold;
    transform: translateX(5px);
}

.prize-item .prize-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prize-item .prize-emoji {
    font-size: 24px;
}

.prize-item .prize-name {
    font-weight: 500;
}

.prize-item .prize-chance {
    background: gold;
    color: #333;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.prize-item .prize-value {
    color: gold;
    font-weight: bold;
}
.wallet-status {
    font-size: 12px;
    margin-top: 5px;
    padding: 3px 8px;
    border-radius: 15px;
    display: inline-block;
}

.wallet-status.active {
    background: rgba(76, 175, 80);
    color: #4caf50;
}

.wallet-status.new {
    background: rgba(255, 243, 224, 1);
    color: #ff9800;
}

/* Сетка NFT */
.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.nft-card {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.nft-card.available {
    border-color: #4CAF50;
}

.nft-card img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    margin-bottom: 10px;
    object-fit: cover;
    border: 2px solid gold;
}

.nft-emoji {
    font-size: 48px;
    margin-bottom: 10px;
}

.nft-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.nft-status {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 15px;
    display: inline-block;
    background: #4CAF50;
}

/* Таблица рейтинга */
.ranking {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-top: 40px;
}

.ranking h3 {
    margin-bottom: 20px;
    font-size: 24px;
    color: gold;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.ranking-table th {
    font-weight: bold;
    color: gold;
}

.ranking-table tr:hover {
    background: rgba(255,255,255,0.05);
}

.place-1 { color: gold; font-weight: bold; }
.place-2 { color: silver; font-weight: bold; }
.place-3 { color: #cd7f32; font-weight: bold; }

/* Загрузка */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
}

.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Адаптивность */
@media (max-width: 768px) {
    h1 { font-size: 2em; }
    .prize-block { min-width: 140px; }
    .prize-emoji { font-size: 32px; }
    .winning-prize { font-size: 80px; }
    .winning-image { width: 100px; height: 100px; }
    .wallet-card { flex-direction: column; }
}

.hidden {
    display: none !important;
}

.error-message {
    color: #ff6b6b;
    text-align: center;
    padding: 20px;
}
/* Добавьте в конец файла spin-style.css */

/* Гарантируем видимость колеса */
.prize-track {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.prize-block {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Исправляем возможные конфликты */
.slot-machine {
    overflow: hidden !important;
    position: relative !important;
}

.prize-track-wrapper {
    overflow: hidden !important;
    position: relative !important;
    height: 100% !important;
}

/* Убираем возможные скрывающие эффекты */
.prize-track.spinning {
    transition: transform 5s cubic-bezier(0.1, 0.7, 0.3, 1) !important;
}

/* Добавьте в конец spin-style.css */

/* Гарантируем, что блоки не схлопываются */
.prize-block {
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

/* Для мобильных - улучшаем скролл */
@media (max-width: 768px) {
    .prize-track-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .slot-machine {
        overflow-x: auto;
    }
}

/* Убираем лишние transition при ресайзе */
.resize-animation-stopper * {
    transition: none !important;
}

/* Исправляем для мобильных */
@media (max-width: 768px) {
    .prize-block {
        min-width: 140px !important;
    }
}