.analiz-page-wrapper {
    padding: 16px 0;
}

.analiz-container {
    background: var(--card-bg, #161616);
    border-radius: 12px;
    padding: 16px;
    font-family: var(--font-main, 'Chakra Petch', sans-serif);
    color: var(--text-primary, #fff);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.analiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface-800, #111111);
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--surface-600, #2a2a2a);
}

.analiz-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.analiz-icon {
    width: 40px;
    height: 40px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success-color, #10b981);
    font-size: 20px;
}

.analiz-title h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
}

.analiz-title p {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: var(--text-secondary, #9ca3af);
}

.analiz-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.analiz-controls label {
    font-size: 13px;
    color: var(--text-secondary, #cbd5e1);
    font-weight: 500;
}

.analiz-select {
    background: var(--surface-900, #050505);
    border: 1px solid var(--surface-600, #2a2a2a);
    color: var(--text-primary, #fff);
    padding: 8px 12px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    padding-right: 32px;
}

.analiz-select:hover, .analiz-select:focus {
    border-color: var(--accent, #f59e0b);
}

.analiz-select option {
    background: var(--surface-800, #111111);
    color: var(--text-primary, #fff);
}

.analiz-results {
    display: flex;
    align-items: center;
    background: var(--surface-800, #111111);
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    min-height: 68px;
    border: 1px solid var(--surface-600, #2a2a2a);
}

.selected-number-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 16px;
    border-right: 1px solid var(--surface-600, #2a2a2a);
}

.selected-num-badge {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--success-color, #10b981);
    color: var(--text-light, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.selected-num-badge.red { background: var(--danger-color, #e11d48); box-shadow: 0 4px 10px rgba(225, 29, 72, 0.3); }
.selected-num-badge.black { background: var(--surface-700, #1c1c1c); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); }
.selected-num-badge.green { background: var(--success-color, #10b981); box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); }
.selected-num-badge.empty { background: var(--surface-900, #050505); color: transparent; box-shadow: none; border: 1px dashed var(--surface-600, #2a2a2a); }

.selected-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.selected-info span {
    font-size: 12px;
    color: var(--text-secondary, #94a3b8);
}

.selected-info strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
}

.neighbors-list {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 16px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--surface-600, #2a2a2a) transparent;
}
.neighbors-list::-webkit-scrollbar {
    height: 4px;
}
.neighbors-list::-webkit-scrollbar-thumb {
    background: var(--surface-600, #2a2a2a);
    border-radius: 10px;
}

.neighbor-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light, #fff);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.neighbor-badge.red { background: var(--danger-color, #e11d48); }
.neighbor-badge.black { background: var(--surface-700, #1c1c1c); }
.neighbor-badge.green { background: var(--success-color, #10b981); }

.clear-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--surface-900, #050505);
    color: var(--text-secondary, #94a3b8);
    border: 1px solid var(--surface-600, #2a2a2a);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 16px;
    margin-left: 12px;
}

.clear-btn:hover {
    background: var(--danger-color, #e11d48);
    color: var(--text-light, #fff);
    border-color: var(--danger-color, #e11d48);
}

.roulette-wrapper {
    display: flex;
    background: var(--surface-800, #111111);
    border-radius: 12px;
    padding: 12px;
    gap: 4px;
    margin-bottom: 16px;
    overflow-x: auto;
    border: 1px solid var(--surface-600, #2a2a2a);
}

.roulette-zero-col {
    display: flex;
}

.roulette-zero-col .roulette-cell {
    width: 44px;
    height: 100%;
    border-radius: 6px;
    background: var(--success-color, #10b981);
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.2);
}

.roulette-grid {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    flex: 1;
    min-width: 580px;
}

.roulette-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light, #fff);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    border: 2px solid transparent;
    height: 44px;
    border-radius: 6px;
}

.roulette-cell.red { background: var(--danger-color, #e11d48); box-shadow: inset 0 -2px 0 rgba(0,0,0,0.2); }
.roulette-cell.black { background: var(--surface-700, #1c1c1c); box-shadow: inset 0 -2px 0 rgba(0,0,0,0.2); }

/* Selection States */
.roulette-cell.is-selected {
    border-color: var(--success-color, #10b981);
    z-index: 2;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5), inset 0 -2px 0 rgba(0,0,0,0.2);
    transform: scale(1.05);
}

.roulette-cell.is-neighbor {
    border-color: #3b82f6; 
    z-index: 1;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4), inset 0 -2px 0 rgba(0,0,0,0.2);
}

.roulette-cell:hover:not(.is-selected) {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.roulette-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px;
    background: var(--surface-800, #111111);
    border-radius: 10px;
    border: 1px solid var(--surface-600, #2a2a2a);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary, #cbd5e1);
    font-weight: 500;
}

.legend-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    box-sizing: border-box;
}

.legend-box.l-selected {
    border: 2px solid var(--success-color, #10b981);
}

.legend-box.l-neighbor {
    border: 2px solid #3b82f6;
}

.legend-box.l-red { background: var(--danger-color, #e11d48); }
.legend-box.l-black { background: var(--surface-700, #1c1c1c); }
.legend-box.l-green { background: var(--success-color, #10b981); }

@media (max-width: 768px) {
    .analiz-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .analiz-results {
        flex-direction: column;
        align-items: stretch;
    }
    .selected-number-box {
        border-right: none;
        border-bottom: 1px solid var(--surface-600, #2a2a2a);
        padding-right: 0;
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
    .neighbors-list {
        padding-left: 0;
    }
    .clear-btn {
        margin-top: 12px;
        align-self: flex-end;
        margin-left: 0;
    }
}
