/* ==================== INTOTES PREDICTION MARKETS ==================== */

#screenIntotes {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 80px 12px 80px 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    background: #000;
    width: 100%;
    box-sizing: border-box;
}

#screenIntotes.active { display: flex !important; }

.intotes-scene {
    width: 100%;
    max-width: 400px;
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    box-sizing: border-box;
}

.intotes-loader {
    width: 40px;
    height: 40px;
    margin: 60px auto;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #FEB021;
    border-radius: 50%;
    animation: cases-spin 0.8s linear infinite;
}

/* Табы */
.intotes-tabs {
    display: flex !important;
    background: rgba(120, 120, 128, 0.16);
    border-radius: 10px;
    padding: 2px;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    gap: 2px;
    flex-shrink: 0;
    align-self: stretch;
}

.intotes-tab {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    min-height: 36px;
    padding: 10px 8px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 11px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #6b7daa;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    white-space: nowrap;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
    text-overflow: ellipsis;
}

.intotes-tab.active {
    background: linear-gradient(135deg, #f0883e, #f5c842) !important;
    color: #0a0f1a !important;
    box-shadow: 
        0 2px 8px rgba(245, 200, 66, 0.4),
        0 4px 15px rgba(245, 200, 66, 0.2);
}

/* Таб истории */
.intotes-history-tab {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    min-height: 36px;
    padding: 10px 8px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    border: none;
    cursor: pointer;
    background: rgba(120, 120, 128, 0.16);
    color: #6b7daa;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    margin-top: 2px;
    box-sizing: border-box;
    align-self: stretch;
}

.intotes-history-tab.active {
    background: linear-gradient(135deg, #f0883e, #f5c842) !important;
    color: #0a0f1a !important;
    box-shadow: 
        0 2px 8px rgba(245, 200, 66, 0.4),
        0 4px 15px rgba(245, 200, 66, 0.2);
}

/* Список рынков */
.intotes-markets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    align-self: stretch;
}

.intotes-market-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 8px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.intotes-market-card:active {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    transform: scale(0.98);
}

.intotes-market-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.intotes-market-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex: 1;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.intotes-market-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

.intotes-market-title span {
    flex: 1;
}

/* Полукруглый индикатор */
.intotes-semicircle-indicator {
    position: relative;
    width: 50px;
    height: 30px;
    flex-shrink: 0;
}

.intotes-semicircle-indicator svg {
    width: 100%;
    height: 100%;
}

.intotes-semicircle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 4;
    stroke-linecap: round;
}

.intotes-semicircle-fill {
    fill: none;
    stroke: #4ade80;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 62.83, 62.83;
    stroke-dashoffset: 0;
}

.intotes-semicircle-info {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    pointer-events: none;
}

.intotes-semicircle-percent {
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.intotes-semicircle-label {
    color: #4ade80;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
}

.intotes-market-prices {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.intotes-price-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.intotes-price-block.yes { text-align: left; }
.intotes-price-block.no { text-align: right; }

.intotes-price-block.user-bet {
    background: linear-gradient(135deg, rgba(240, 136, 62, 0.15), rgba(245, 200, 66, 0.1));
    border: 1px solid rgba(245, 200, 66, 0.3);
    box-shadow: 0 0 10px rgba(245, 200, 66, 0.2);
}

.intotes-price-block.locked {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.intotes-price-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.intotes-price-block.yes .intotes-price-label {
    color: #4ade80;
    text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.intotes-price-block.no .intotes-price-label {
    color: #f87171;
    text-shadow: 0 0 10px rgba(248, 113, 113, 0.5);
}

.intotes-price-block.user-bet .intotes-price-label {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.intotes-price-value {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.intotes-price-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
}

.intotes-market-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.intotes-market-volume {
    color: #6b7daa;
    font-size: 11px;
}

.intotes-market-timer {
    color: #6b7daa;
    font-size: 10px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Список вариантов */
.intotes-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.intotes-option-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    width: 100%;
}

.intotes-option-row:active {
    background: rgba(255, 255, 255, 0.06);
}

.intotes-option-row.user-bet-row {
    border-color: rgba(245, 200, 66, 0.3);
    background: linear-gradient(135deg, rgba(240, 136, 62, 0.08), rgba(245, 200, 66, 0.05));
    box-shadow: 0 0 10px rgba(245, 200, 66, 0.15);
}

.intotes-option-name {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.intotes-option-buttons {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.intotes-option-btn {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.intotes-option-btn.yes {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.3);
}

.intotes-option-btn.no {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
}

.intotes-option-btn.user-bet-btn {
    background: linear-gradient(135deg, #f0883e, #f5c842) !important;
    color: #0a0f1a !important;
    border-color: #f5c842 !important;
    box-shadow: 0 0 10px rgba(245, 200, 66, 0.4);
}

.intotes-option-btn.locked {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.intotes-option-btn:active {
    transform: scale(0.95);
}

.intotes-option-percent {
    color: #6b7daa;
    font-size: 10px;
    min-width: 35px;
    text-align: right;
    flex-shrink: 0;
}

/* История ставок */
.intotes-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    align-self: stretch;
}

.intotes-history-item {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    box-sizing: border-box;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 8px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.intotes-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.intotes-history-market {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex: 1;
}

.intotes-history-status {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 1px;
}

.intotes-history-status.won {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.intotes-history-status.lost {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

.intotes-history-status.refunded {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.intotes-history-status.active {
    color: #6b7daa;
    background: rgba(255, 255, 255, 0.05);
}

.intotes-history-prices {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

.intotes-history-price-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.intotes-history-price-block:first-child {
    text-align: left;
}

.intotes-history-price-block:last-child {
    text-align: right;
}

.intotes-history-price-block span:first-child {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.intotes-history-price-block span:last-child {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.intotes-history-price-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
}

.intotes-history-win {
    color: #4ade80;
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
}

.intotes-history-lost {
    color: #f87171;
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
}

.intotes-history-refunded {
    color: #ffd700;
    font-size: 12px;
    font-weight: 700;
    margin-top: 4px;
}

.intotes-history-date {
    color: #6b7daa;
    font-size: 10px;
    margin-top: 6px;
}

/* Модалка торговли */
.intotes-trade-modal {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 600;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.intotes-trade-card {
    width: 100%;
    background: linear-gradient(180deg, #0d0f17, #0a0c12);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    padding: 28px 24px 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
    box-shadow: 
        0 -8px 40px rgba(0, 0, 0, 0.5),
        0 -4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.intotes-trade-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.intotes-trade-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    flex: 1;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.intotes-trade-subtitle {
    color: #ffd700;
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

.intotes-trade-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #8a93a8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.intotes-trade-close:active {
    background: rgba(255, 255, 255, 0.15);
}

/* Табы валюты */
.intotes-currency-tabs {
    display: flex;
    background: rgba(120, 120, 128, 0.16);
    border-radius: 10px;
    padding: 2px;
    gap: 2px;
    width: 100%;
    box-sizing: border-box;
}

.intotes-currency-tab {
    flex: 1;
    min-height: 40px;
    padding: 10px 8px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #6b7daa;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.intotes-currency-tab.active {
    background: linear-gradient(135deg, #f0883e, #f5c842) !important;
    color: #0a0f1a !important;
    box-shadow: 
        0 2px 8px rgba(245, 200, 66, 0.4),
        0 4px 15px rgba(245, 200, 66, 0.2);
}

/* Поле ввода */
.intotes-amount-input-row {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.intotes-trade-input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s;
}

.intotes-trade-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.intotes-trade-input:focus {
    border-color: rgba(245, 200, 66, 0.4);
    box-shadow: 
        0 0 10px rgba(245, 200, 66, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.intotes-amount-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    object-fit: contain;
    pointer-events: none;
}

.intotes-trade-sides {
    display: flex;
    gap: 12px;
}

.intotes-side-btn {
    flex: 1;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
}

.intotes-side-btn.yes.active {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    box-shadow: 
        0 0 15px rgba(74, 222, 128, 0.3),
        0 4px 20px rgba(74, 222, 128, 0.15);
}

.intotes-side-btn.no.active {
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    box-shadow: 
        0 0 15px rgba(248, 113, 113, 0.3),
        0 4px 20px rgba(248, 113, 113, 0.15);
}

.intotes-side-btn.locked {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    border-color: rgba(255, 255, 255, 0.05) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    box-shadow: none !important;
}

.intotes-side-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.intotes-side-btn.yes .intotes-side-label { color: #4ade80; }
.intotes-side-btn.no .intotes-side-label { color: #f87171; }

.intotes-side-price {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.intotes-locked-label {
    font-size: 8px;
    font-weight: 700;
    color: #6b7daa;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.intotes-trade-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.intotes-info-row {
    display: flex;
    justify-content: space-between;
    color: #6b7daa;
    font-size: 13px;
}

.intotes-info-row span:last-child {
    color: #fff;
    font-weight: 700;
}

.intotes-trade-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f0883e, #f5c842, #ffd700);
    color: #0a0f1a;
    border: 1px solid #f5c84260;
    box-shadow: 
        0 4px 15px rgba(240, 136, 62, 0.4),
        0 8px 30px rgba(240, 136, 62, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.25s;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

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

.intotes-trade-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.intotes-cancel-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.intotes-cancel-btn:active {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 400px) {
    .intotes-scene {
        max-width: 100%;
        min-width: 100%;
    }
    
    .intotes-market-card {
        padding: 12px;
    }
    
    .intotes-tab {
        font-size: 10px;
        padding: 8px 4px;
    }
}

.intotes-trade-image-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.intotes-trade-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16/9;
    display: block;
    border-radius: 12px;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 8px 30px rgba(0, 0, 0, 0.15);
}